LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA control of LED light

Solved!
Go to solution

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 

Download All
0 Kudos
Message 1 of 10
(1,854 Views)

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.


CLD Using LabVIEW since 2013
0 Kudos
Message 2 of 10
(1,850 Views)

Here is a screen shot of the command being inserted into MAX

0 Kudos
Message 3 of 10
(1,844 Views)
Solution
Accepted by topic author SimonAldred

Try this

visa.PNG


CLD Using LabVIEW since 2013
Message 4 of 10
(1,840 Views)

Brilliant. Thank you for your help. 

0 Kudos
Message 5 of 10
(1,830 Views)

Out of interest, why does this work and not the original approach? 

0 Kudos
Message 6 of 10
(1,771 Views)

It always works like this to me..

If \r\n doesn't work then I use End of Line Constant.


CLD Using LabVIEW since 2013
0 Kudos
Message 7 of 10
(1,765 Views)

Useful to know. Anyway you have helped enormously. 

 

Thank you! 

0 Kudos
Message 8 of 10
(1,761 Views)

@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. 

Now Using LabVIEW 2019SP1 and TestStand 2019
0 Kudos
Message 9 of 10
(1,744 Views)

OK thanks. I'll look into it. 

0 Kudos
Message 10 of 10
(1,735 Views)