LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA serial port communication – communication with device too slow

I am having some trouble with using VISA to communicate with a serial device. I am trying to control an advanced illumination line light. The attached program writes information to it just fine, nothing fancy there. However it seems that if I try to update any faster than about 300mS the line light controller will not properly receive the information and does not adjust the light. The device came with a simple program to control it which can update faster than 100mS. Any suggestions for faster updates?

 

Thanks,

Rob   

0 Kudos
Message 1 of 8
(3,769 Views)
Rob,

I see a few things which might make your program a bit simpler, but none of them will have much effect on the response times.

Do you get any errors? Does the controller return any indication of when it is ready for a new command?

Lynn
0 Kudos
Message 2 of 8
(3,749 Views)

I only get errors that are sent back from the device (when I have a Visa read in the code of course). These problems only occur if I try to update faster than 300mS

 

The current program sends an intensity value to the device, upon accepting this value the device replies with the intensity that it was just set to.

0 Kudos
Message 3 of 8
(3,735 Views)

Download portmon from this website.  It will let you spy on the serial port data while the commands are flying. Use it with both programs accessing the device. You can save the data stream and print them out to compare.

http://www.sysinternals.com/utilities/portmon.html

0 Kudos
Message 4 of 8
(3,727 Views)

Looks like this will be a rather useful program...

I ran the program and the results are in the attached files. 250mS.txt is of course running the LabVIEW application with a 250mS wait and 350mS.txt is using 350mS. As can be seen from the files everything returns a success each time, however the line light does not properly adjust its self when I use 250mS.

Download All
0 Kudos
Message 5 of 8
(3,695 Views)
Can you run the simple program that came with the device, that runs at 100ms, and attach the results from it??
0 Kudos
Message 6 of 8
(3,688 Views)
0 Kudos
Message 7 of 8
(3,672 Views)

After looking at the manufactures VB source code it seems that a carriage return and line feed constant should be included at the end of every string sent. After making that change the program worked fine and can update faster than 40mS.

 

Thank you all for the help.

0 Kudos
Message 8 of 8
(3,625 Views)