02-28-2014 11:22 AM
Do your instuments require commands to be terminated with a line feed? In addition, unless your "milliseconds to wait" is fairly large it may not have any effect on your timing. The wait is running in parallel to the VISA Write and Read. If those operations take longer than your wait delay it will be those operations which control the timing of your loop. Have you checked the obvious things such as your connection and cables. Does your instrumen talways terminate its responses with a line feed? If not your read will time out unless the data equals or surpasses your bytes to read. You can use the VISA property of "Number of Bytes at Serial Port" to get the amount of data that you need to read.
02-28-2014 11:22 AM
I am not sure about the cable only that the original code was written in LV-6 with the existing cable and the old setup was working a month ago. I have included a sort of handshaking between the main vi and the Test serial. The Test serial writes the "?" but what I have noticed is that the main vi only once and a while reads the "?" that allow it to write the array.
02-28-2014 12:49 PM
What I can tell from the behavior is the link seems to be hanging up on the read data string in visa. The main vi does get the Tx from the serial test as "?" but the serial test exe pauses for >30 sec sometimes before responding. Other times it times out. I am getting a line feed from the visa write. I found this out earlier when I was getting the data and an empty sting toggling back and fourth. The spreadsheet to string also inserts a LF. If I remove the handshaking logic the data string does show up but it seems to concatenate parts of the data string together and the length verses.