We are trying to switch an LED light on/off from LabVIEW. We can do it from MAX using a VISA test panel, but have so far failed to do so from a LabVIEW program. I have tried VISA commands and TCP/IP, to no avail. When we run the LabView programs we get no errors and valid connections appear to be being made. It's just that the LED doesn't respond to the commands we are sending. The commands are identical to the ones we are using in the test panel. Any help would be much appreciated.
Solved! Go to Solution.
I cannot see the command that you were sending through max. Kindly upload that image also.
Since your device is on socket you may not require to send command through TCP/IP, NI- VISA is ok.
Instead of using \r\n you can concatenate your command with end of line constant from string pallet.
It always works like this to me..
If \r\n doesn't work then I use End of Line Constant.
Out of interest, why does this work and not the original approach?
I don't have LV2020 but I suspect that your string control or constant for the command is not set to '\' codes display through the right-click menu so LabVIEW sees this a literal \ followed by n etc.