From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sending and recieving strings over ethernet (VISA/TCP/IP)

Appologies if this was answered elseware..

 

I am trying to connect to a device on my LAN and read/write string (write commands) to it via either the VISA VIs or the TCP VIs. I am not sure which is best. I am able to ping the device on the network at IP 192.168.2.10 and I was told by a co-worker that the communicaiton port for the device is "port 23".

 

My question is which is the better VI for this string comm (EX: get/set_frequency XXXX) and also how do I configure the VIs for said purpose?

 

I did not find the help within LV clear and I was having a hard time Googling my question.

 

Thanks

0 Kudos
Message 1 of 3
(3,821 Views)

Hi Azmatt,

 

you should ask your co-worker not just for the port, but also for the communication protocol used by that device…

 

What kind of device? Are there ready-to-use device drivers in the InstrumentDriverNetwork ( www.ni.com/idnet )?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 3
(3,798 Views)

Using VISA (I Recommend using VISA) you configure the I/O session with a right-click to either a session constant or Front Panel control.:

Capture.PNG

 

Now that you have a session of the right class most of the time you can use default properties and just write and read to your hearts content.  However, every so often you need to do something unusual to get the communications going (Consult the device's manual for device settings) 

A Property node will let you get or set the properties of the session:

(The properties with arrows on the right are "Read Only" all others are read or write)

Capture.PNG


"Should be" isn't "Is" -Jay
0 Kudos
Message 3 of 3
(3,789 Views)