VISA series Loopback speed and precision with double loops and a queue

I'm working on a test of communication between 2 PCs. I test communication series RS-422 ports by using a simple loop. PC2 wrote continuous data at 38400 baud to PC1 (LabVIEW test code is here). PC1 reads the data and writes the data to the same port as soon as possible. PC2, reads the data and compares to what should be returned. I can get the highest speed is a speed of about 37300. Because it is continuous, finally that I get an error because the buffer overruns (read and write buffers are 65KO).

It seems that VISA writing takes a lot longer than the VISA read. I do read/write asynchronous operations. I've read a fixed amount of data (1024 bytes) and then queued data to write in another loop. My timeout is set to 0.5 seconds, which is much time opf at 38400 baud (4800 bytes/second). I played a bit with these numbers, and they are the best I can get. If I increase the data read to 2 KB, the queue members increase. If I'm going too low, I start getting the data in the input buffer overrun.

Anyone had experience with this type of test? The code is attached. Please take a look and see if I'm doing things correctly.

Michael

I do not know if this explains a gap between what you expect and what you found in 0.8 seconds, but you have added another level of complication in using the digiboard.  You don't have a real serial port, but a simulated serial port which is hung at the end of a USB bus.  The digiboard software creates a virtual experiences, and so its driver software and firmware on the side of the Board of Directors of the USB bus must manage some translations to go a number of compote, transfer on the bus and decode the Compote number so that it knows which 8 physical ports that it must send the message to.  You can see delays in translation at each end so something in the USB itself Protocol where it needs group information.

If you have another, a different brand of the serial ports, you can use, you might want to try one of these to see if you get similar or different results.  But I don't think it's a good idea to try to test the limits of a serial communication device using hardware that adds the other layers of the communication protocol and therefore complicated results.

Tags: NI Software

Similar Questions

  • Problems write in I / O with VISA series (low speed of the program being recorded)

    Hello! I've been monitoring voltage speed of the serial port 230000 baud / s. It is fast and accurate, but when I want to save this data to a tmds, xls, txt file, reduce the speed of the program and buffer overflows in series, which reduces the voltage rate control information. I tried on 2 PC with four core processors. I think that it is not because of the PC.

    Because of what it might be?

    File IO is SLOW.  You must compensate for that somewhere.  Look at the producer/consumer.  The idea here is to have a loop that simply reads the serial port (as fast as it should) and use a queue to pass data to another loop to process and save to disk.

  • Can someone tell me what's wrong with my loop of consumer queue or producer?

    A Labview engineer helped me with the overall structure of my program, made necessary by the rapid sampling rate data and post-processing requirements. He recommended the producer/consumer, loop and using one of the example (Cont CQI graph - int clk voltage) files to actual data acquisition. So I put the loop on foot and spend my two channels of data acq past in the loop of the producer. However, nothing is get picked up in the loop of consumer and none of my data gets displayed there.

    Someone wants to take a look and let me know what I am doing wrong?

    It seems that the only time where you have to write the data in the queue (in the loop of the producer), when you stop the DAQ while loop or the acquisition of data generates an error.

    You may need to place the element from the queue node in the data acquisition while loop.

  • VISA series operation does not work when the PC software performs

    Hello everyone.

    I'm using LabVIEW to communicate with a control via VISA series. I can communicate with this box in most areas very well, as surveillance data function I use without any problem. The only thing I have a problem with the unit is calibrated. Calibration is achieved by opening a binary file and transfer the data of 16 bytes at a time during the series with the help of a 16-byte write the command that has this structure: [command, in this case 'P'] [2 bytes from 3800 HEX address] [16 bytes of data] [checksum 1 byte]. I'm correctly calculate the checksum, and the documentation says that the box must respond to all orders less than 100 milliseconds.

    When I try to do, the zone responds with one E several times (E is supposed to say checksum error, even if I am calculating correctly), then no longer responds to nothing. The strange thing is that this box comes with a software that allows to calibrate it and that the software has no problem with him!

    I tried using SuperMon to capture what the software sends on the series and compare it to what I pass, and from what I see, it sends the same data that I do, only he works and mine is not. I also tried using SuperMon to manually send the writing 16 bytes of a calibration function at a time, and he seems to have the same problem.

    It seems that their software works, I do something wrong. Here is a screenshot of my code that I am using. Any help would be greatly appreciated!

    I contacted officials of the control box and have solved the problem. Control box delay needs 5 to 10 milliseconds between each byte, not all orders than I had initially thought. Thanks for all the useful answers, and especially the number of split tip, which really cleans my code!

  • To convert my Keynote slideshow (09) .mov, I always end up with double blades on slides with sound, a sound and one without the sound. Why? How should I do?

    When trying to convert a Keynote slide show (09) in format .mov, I end up with double blades on slides that have sound. What makes the total video almost twice as long as I wish. How do the conversion with only sound slides appearing and eliminating silent rehearsals?

    You will need to confirm which version of Mac OS, and Keynote, you use as your profile shows very old software that is obsolete and is no longer supported. I assume his keynote address version 4 If you are using Mac G5.

    IV never heard of Keynote, do what you describe in any version, so we need the details of how you have the presentation put in place. If you post a sample file that illustrates this problem on Dropbox I review on my old power Mac.

  • IE is slow, hangs in Google, will run Firefox under Windows 7 with speed and security?

    I'm not very tech savy English so good please. I have a desktop Dell Studio with Intel 2 Quad Processer. I have used IE for 15 years and more. Started using Google Chrome for speed and better security about 6 months without any problem. Shortly after the beginning of the year Chrome started crashing every day and from 1/14 he broke the 10-12 times a day. I don't like losing stuff and having to stop, re - load, raise or re-store that Chrome was more than that was working properly.

    Will Firefox work in my system operating system. I loan on your security, password protection and other things that are touted on your website on Firefox, but I'm mostly concerned about accidents and what are the causes. Is the problem in my own system and not questions of brower?

    I just want to surf, read, watch you tube, facebook with friends and family. I am 65 years old and retired, and I'm really disguested with all the problems I encounter.

    I think Firefox is a good product, but I need answers to the questions I asked.

    We hope to hear from someone very soon on the issues that I raised. If I download Firefox, should I uninstall IE. I already have an installed Chrome =.

    Thank you
    Jim Yeary
    jyeary3 @ spring TX

    I do not know what is causing your Chrome or IE falls down, but you can give a Firefox. I'll give you a few different things you need to do before installing Firefox to make sure that your computer works well if.

    Install all Windows updates. Check several times until there is no more.

    Update your graphics Driver. Update your graphics drivers to use hardware acceleration and WebGL

    Scan of malware: troubleshoot Firefox problems caused by malicious software

    Once you have done this, install Firefox! How to download and install Firefox on Windows

  • I want to control the speed and direction of a motor continuous using labview with pwm

    I want to control the speed and direction of a motor (essentially a toy motor) continuous generating a PWM signal in labview. I'm using L293d motor and exit DAQ-9472. Can I do this without the help of any microcontroller but only a simple labview code and the DAQ 9472 output

    There are many examples on how to generate a PWM on one in the buffer, or on a counter, but that does not support this card.  A 8 a cDAQ chassis also a BNC connector that can be used as a counter as well.  These examples can be found in help > example Finder in LabVIEW.

    Also be aware of your current limiting.  This card can drive a decent amount of current, but it has its limits.  You'll want to put an inline meter to see what is current and see how far you get to it.

  • What is the best way to read data series high speed?

    My goal is to read 14 bytes of binary data of an instrument on the serial RS232 (460800 baud) to 2000 Hz. I didn't get a card series high speed again so I am currently using the standard serial port (115200 baud) and reading at 400 Hz I have configure the port series, empty the buffer, and then enter a while loop to read incoming data. I have a visa 14 bytes read by interation seconds 0.0025 (400 Hz). However it seems that the sensor is spewing data faster that labview can read because the bytes are accumilating in the port. After some time the buffer fills and the program fails.

    Is there a better way to do it?

    Would it not be better to read the larger quantities of data less often, for example as 1400 bytes every 0.25 seconds?

    Thank you

    Hello

    I think it would be good to read several points in a loop, and keep the loop less than 1000 Hz.  I found in the past, have something to run faster than about 10ms tends to fall down when windows loses interest in the process.  So yes, choose the slower you can get away with reading samples - for example to read every 10ms and read 20 samples every time. You should be able to configure your serial port in order to buffer the samples that I guess.

    Also and the issue of windows - if you use a loop "timed" instead of a while loop, so you can force it to an integer value including the ms.  You can also assign a dedicated processor and set the priority to 100, which means that it is less likely to elapse and decide to scan your hard drive for viruses or consult your account e-mail or what he does when he's bored with your program.  Also it "' tells you if the loop has taken longer that planned to run - you can use this to help iron out bugs etc. - report and/or to the user if you missed a few samples.

    http://zone.NI.com/reference/en-XX/help/371361H-01/Glang/timed_loop/

    JP

  • VISA series 2012

    Hey all,.

    I worked with LabVIEW 2011 to develop a program to drive a motor via the VISA series block. I've updated since for 2012, and I had problems to get the LabVIEW program to reward the engine. I have a 3rd third-party program installed that I can use to send signals of the motor base, so I know all drivers are installed correctly and there is no communication error between the engine and the computer controller.

    Anyone had this problem before? My suspicion is that there may be a compatibility problem with communication between the versions of labview 2011 and 2012 series.

    Any help is greatly appreciated!

    Hi Phil,

    Thanks for the screenshot. At first glance, it doesn't look like something fishy is going on. That being said, let me know when you run the example of shipping if you are able to see the available COM ports.

    Another thing to check is to bring visa installed on the new machine. Under the record of National Instruments, you can check in your Start menu. If it isn't there, you can download it here http://search.ni.com/nisearch/app/main/p/bot/no/ap/tech/lang/en/pg/1/sn/catnav: of, n8:3.1637, ssnav:su... . Also you can check and see if the COM ports appear in measurement and Automation Explorer? Let me know if one of these suggestions solves your problem, otherwise we will continue troubleshooting.

    Thank you

    Doug W

  • Visa series read write

    Hello..

    I have no problem with reading series. I want to playback multiple visa series... Fist read I want to read the data of 5x8bit uC then if visa data read isnot "NOT" I'm going to send data to the CPU as the character ' end then read data from uC to new but is leght data 2x8bit data...

    Please, help me...

    This is the number of bytes you want to read. You already said you first want to read 5 bytes. If you use VISA set up the Serial Port and the stop character allow to true, you can set a number of high bytes and playback will end when the stop character is detected. The character of default endpoint is a line break. If you set it to false, you can use the bytes VISA to the Serial Port to determine the number of bytes in the buffer is and read this number. This makes the basic example.

    Did you do any debugging serial communication base? I suggest that you use a program like Hyperterminal/Procomm/Putty/.etc before trying to write your own program. It is also difficult to give detailed advice without knowing how you have set the serial communication of the microphone.

  • Series read returns the string with excess-need information to extract data from the middle of the string

    I read data from a STI flow meter using the base series writing and reading which used the VISA.  The read string begins with 'OK' or an error code, then a carriage return, then the data follows streaming rate temp pressure flow rate comma comma comma comma Temp... and so on. The string ends with a CR LF.  I need to pull the flow, temperature and pressure data out of the string and write it to a file.  I have difficulties to find a function that will retrieve the data for the string.  Any suggestions?  Thank you.

    Try the subset of string in the palette of the chain.

    Or match the model if you want a more direct control.

    Also a good way is the string analysis, but you must be willing to read oexactly, what happens or an error, pass the entrance.

  • Redundancy with double tis on cisco ASA VPN Site to Site

    Dear supporters,

    Could you help me to provide a configuration for the network as an attachment diagram.

    I am suitable with your help.

    Thank you

    Best regards

    Hi Sothengse,

    You can visit the below link and configure ASA @ head and Canes accordingly to your condition.

    You must change the configuration of the similar example with ends... Double TIS @ ends in your scenario...

    http://networkology.NET/2013/03/08/site-to-site-VPN-with-dual-ISP-for-BA...

    I hope this helps.

    Concerning

    Knockaert

  • Footage speed up corresponding with Audio!

    I know that it is possible to do a logo shaking or pulse audio in the background exceed a certain level. Is it possible for a film speed up after audio exceeds a certain level. So my project's images of flying in the clouds, and I have music in the background, I need the film to accelerate after audio exceeds the level I want it. Is this possible?

    Writing expressions that speed up and slow down time-remapping is quite complicated. When you enable the time remapping effect you get two keyframes, one at the beginning of the layer and the other at the end. You can then delete the keyframe at the end that essentially freezes the video or animation on the first image. You then add a phrase like this and the video will play at half speed:

    time * 2

    To play at double speed, you can replace the expression at the time *.5

    The complexity comes when you want normal speed ramp (time * 1) to four times normal speed (time *. 25) because the math and calculations get very uncomfortable. Dan Ebberts, the Dean of the expressions, has an excellent article on its website that will point you in the right direction. Find it here: Expression of speed and frequency

    At the bottom of the article is an example that uses audio to speed up and slow down a clip with this expression and the Audio to keyframes keyframe assistant:

    SPD = thisComp.layer("Audio_Amplitude").effect ("the two Channels")("Slider");

    mult =. 5;

    n = spd.numKeys;

    If (n > 0 & .time spd.key (1))<>

    Accum = spd.key (1) .value * (spd.key (1) .time - inPoint);

    for (i = 2; I have<= n;="">

    If (spd.key (i) .time > time) break;

    K1 = spd.key(i-1);

    K2 = spd.key (i);

    Accum += (k1.value + k2.value) * (k2.time - k1.time) / 2;

    }

    Accum += (spd.value + spd.key(i-1).value) * (time - spd.key(i-1).time) / 2;

    } else {}

    Accum = spd.value* (time - inPoint);

    }

    accum + value * mult

    It would be a good starting point. You add your own cursor, and replace the layer Audio Amplitude in the first line, and then to keyframe changes speed.

    Here's one more thing that will make the process easier if you cut your video clip in the model. If you activate the effect time remap keyframes will be placed at the head and the tail of the clip, not the in and out point. If you choose layer > time > Freeze Frame, you will get a keyframe in ICT. This makes things much easier to work with. You'll probably also want to 0 the value of time code at beginning of your publication

  • Forest line continues speeds and zoomed out or say NO, but should?

    Here's my simple problem that I can't solve.

    I'll try to be as detailed as possible because I don't know what step needs to be corrected.

    I would like to create a view of the landscape seen by someone on a sled ride down the Hill.

    It starts with a winter in extreme forest clogged then the trees begin to move to the left so slightly, then speed up to the bottom of the Hill and then decelerate and zoom back a fine on the horizon line while slowing, but still moving to the left of the screen.

    How I decided to create this scene:

    1. I created a nice multi file layers in Illustrator with all the trees that overlap between them. The file is the width of the artboard maximum authorized by the Illustrator.
    2. I imported this file multi Illustrator layers into After Effects as a model with separate layers.
    3. I assigned slight movement in the layers of right left at different speeds. He adds a dimension to the view you see a line of trees behind the other at a slightly different speed. This step does not seem to create problems.
    4. I continued in the construction of the continuous line of trees extending to the right by duplicating imported Illustrator layers until I've reached the limits after effects Comp size of the canvas. I think it's to 30000 or 60000 pxls. The reason why I need big trees is because at the beginning of the animation we see at the very end upward with all the leaves and the branches visible. Then the line of the forest begins to move to the left and accelerates.
    5. Finally, it accelerates and zoom at the same time enough to end on the right. At that time, the trees are 50% the size of the screen. Reimport the layers of my tree and perfectly match them the couture and affect the speed and if it continues to pass in front of the Viewer to the left of the scale and I wander into perspective.
    6. And now everything goes wrong. I have perfectly match the original line points of tree and the extra trees limit. I see that well, they affect each other in the beginning of the movement and at the end.
    7. However, unexpectedly in the Middle, they start to overlap and move a little faster. For example: the left end of the second line of forest key the right end of the first line of the forest initially to 10 sec and it touches the same to end at 20 sec. However, at 15 sec it accelerates and directly past the right end of the first line of the forest. I tried to fix it by doing a keyframe to 15 sec and harmonizing again. It has two small jumps 12.5 dry and dry 17.5. If I continue to overlay on between frames the left end of the second line of the forest continues to make small jumps between the two. If I try to set the zoom at the again it messes up everything. I have set up my anchor to the left of the layer.
    8. I thought that the problem is with scale, so I did the 3D layer and began to cut a Z dimension but got the same result. The layers of jump each other and it does not appear as a continuous movement.
      POTENTIAL PROBLEM: I assign simple ease, facilitated in a deceleration, so my acceleration and deceleration were nice and smooth movement. However I tried to match the speed and the speed in the window options Key Frame (double click Alt on PC opens this dialog window) between the original and the extra lines of forest.

    I can't make this line of forest long enough in a static window that I arrived to the limitation of the width of the canvas size after Efffects. I need very large because it starts at extreme close and then zoomed out to extreme and a horizon.

    I can't make a moving line and keep patching up as movement is inconsistent and lines beginning to speed between keyframes and overlap.

    I have the problem, it's the combination of the right side to the movement of the left and the zoom motion (which I tried both ways: scale layer to a 2D layer and the Z Dimension in the 3D layer) but I can't match even the linear speed of the lines of forest from right to left. There may be a problem with how I'm trying to match it.

    I even rebuilt the entire project if anyone can list the steps how make a continuous line of patched up items synchronized, so that they seem like a continuous image line.

    Difficult to really grasp the situation without a few screen grabs, but some general thoughts:

    If all your elements are the vector art in Illustrator, the scale should not be a factor.  Set your Illustrator layers to continuously rasterize, and you get too close you like the layers with the camera and they will be always strong.  So you can work on a set of more small scale and not go beyond limitation of 30000 pixels of AE.  Which also means that you will not need to frame-match two environments.

    It seems to me that you are overloading the work.  Personally, I wouldn't combine camera movements and the zoom - the potential that ranged from focal lengths will be upset something is too big.  I would just do everything with the movement of the camera, using the X for movement left-right axis and Z axis to get close or continue to your subjects.  After Effects cameras simulate the way cameras of real world work, so it is best to approach the work as a real-world situation.  Build the world, and then animate the camera moving in this world.

    Don't forget that you can use Precomposed/Nested compositions to greatly simplify your work.  Make a bouquet of 10 or so trees in a model, and then use this nested pre model several times in your main computer.  Don't forget to condense the transformations of the pre comps.

  • E series SVE14121CVW CPU and graphic card

    Good day, Hope your b bothered not how no idea, I'm on that sort of thing. Then, I got a new laptop sony e series, which is; SVE14121CVW. Its actually pretty cool, but I want it to be compatible with some of my online games that have seriously qualifications high for speed and graphics. I want to know if I could change its processor (Intel (r) Pentium (r) B980 2.40 GHz) and Intel HD Graphics Card graphics card. If so please suggest some that is compatible with my laptop.

    Thanks in advance and God bless

    Changing the processor is possible, but not graphics.  The graphics card is integrated to the motherboard... Please note that any damage incurred to the unit the warranty...

Maybe you are looking for