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
(950 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
(946 Views)

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

0 Kudos
Message 3 of 10
(940 Views)
Solution
Accepted by topic author SimonAldred

Try this

visa.PNG


CLD Using LabVIEW since 2013
Message 4 of 10
(936 Views)

Brilliant. Thank you for your help. 

0 Kudos
Message 5 of 10
(926 Views)

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

0 Kudos
Message 6 of 10
(867 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
(861 Views)

Useful to know. Anyway you have helped enormously. 

 

Thank you! 

0 Kudos
Message 8 of 10
(857 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
(840 Views)

OK thanks. I'll look into it. 

0 Kudos
Message 10 of 10
(831 Views)