12-20-2021 03:26 AM
Hi,
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.
Thanks
Simon
Solved! Go to Solution.
12-20-2021 03:50 AM
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.
12-20-2021 03:56 AM
Here is a screen shot of the command being inserted into MAX
12-20-2021 04:01 AM
Try this
12-20-2021 04:15 AM
Brilliant. Thank you for your help.
12-21-2021 04:28 AM
Out of interest, why does this work and not the original approach?
12-21-2021 05:32 AM
It always works like this to me..
If \r\n doesn't work then I use End of Line Constant.
12-21-2021 05:34 AM
Useful to know. Anyway you have helped enormously.
Thank you!
12-21-2021 11:15 AM - edited 12-21-2021 11:16 AM
@SimonAldred wrote:
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.
12-21-2021 12:45 PM
OK thanks. I'll look into it.