07-12-2012 01:11 PM
I am using LabView 8.6 on Windows Vista and trying the Basic serial write and read VI to communicate with a Keyence sensor over RS232. I tested this communication over hyperterminal and it worked fine. When I use the VI it works only when Highlight Execution is turned ON. I have a delay before read set to 500 ms (and tried other values) and it returns no values under regular execution. I have used this VI prior with Windows XP and same version of LabView with no problems. Any help would be appreciated.
07-12-2012 01:56 PM
Can you post the VI? If you cannot post the whole thing just post the relavent parts.
07-12-2012 02:38 PM
This is the Basic Read and Write example I am trying to use.
07-12-2012 05:40 PM
Interesting. I don't see anything that jumps out. Did you try changing the 500mS wait to something crazy like 5,000mS? You might try putting a delay after the configure.
07-13-2012 11:19 AM
In the code you posted, the Enable Termination Char is set to false. Try changing it to true.
07-13-2012 11:34 AM
I have tried a variety of delay times, from 10ms up to 10,000ms. It eventually timesout when the delay is too high. I have also tried enabling and disabling the Enable Termination Char. This example worked without any problems with the same hardware when I used it on a Windows XP computer, this problem came up when i switched to a Windows Vista computer. Could that be affecting it somehow?
07-13-2012 12:03 PM
Is NI-VISA installed on the Vista machine? If so what version?
07-13-2012 12:07 PM
How about trying a small delay between each character that is written? So if you are sending *IDN?, write *, wait, write I, wait, write D, wait, write N, wait, write ?
07-13-2012 12:19 PM
07-13-2012 12:32 PM
I did not originally have NI-VISA installed, but I did install it (version 5.1.2). I did not try sending one character at a time, however I did try sending one bit at a time. It did not make a difference. I am also sure I have the correct port because it works when Highlight Execution is enabled.