07-30-2013 12:31 PM
So I have a program that connects to a VISA resource that has been setup in the MAX tool before. However, the IP address of my oscilloscope isn't static, so I have to change the VISA resource settings every few weeks. Is there a way to pass in an IP address as a parameter to the program and automatically create a VISA resource.
Thanks
07-30-2013 03:08 PM
@tikihiki wrote:
So I have a program that connects to a VISA resource that has been setup in the MAX tool before. However, the IP address of my oscilloscope isn't static, so I have to change the VISA resource settings every few weeks. Is there a way to pass in an IP address as a parameter to the program and automatically create a VISA resource.
Thanks
I would set up a static IP address on the scope.
07-30-2013 03:40 PM - edited 07-30-2013 03:41 PM
If a static IP address isn't an option, is there any other way to do it?
07-30-2013 04:10 PM - edited 07-30-2013 04:11 PM
You can wire a string to VISA functions in place of a VISA resource. You can edit the string so it contains the correct IP address.
EDIT: Or you can skip VISA entirely and use LabVIEW's TCP/IP functions.
07-30-2013 04:48 PM
Thanks! I will go with the first option, could you please elaborate? Can i just pass a string saying "123.123.123.12" or whatever into the "Visa Resource Name" input, or is there more to it than that?
07-30-2013 04:59 PM
It needs to look exactly like the text in the VISA resource. Wherever the IP address is within the resource, replace that and keep the rest of the text the same.