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: 

How can i use the TCP/IP to control the instrument via VISA resource?

IIRC - If I recall correctly. Google helps with those (pretty common) abbreviations...

0 Kudos
Message 11 of 35
(2,310 Views)

See How Do I Connect to Ethernet Instruments with NI-VISA? for more options of the TCP\IP VISA resource.

 

Not sure if that's it, and it will be hard to give further advice without the hardware.

 

Try to (temporarily) disable the firewall. It might be blocking LabVIEW.exe (and not MAX).

0 Kudos
Message 12 of 35
(2,310 Views)

If you are using IP addresses in the 192.168.x.x range, I suppose you are using some kind of router.  Are you sure the router isn't sitting at 192.168.1.1???

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 13 of 35
(2,286 Views)

wiebe@CARYA  wrote:

If you set the send end termination character to true, you shouldn't have to put it in the constant. Both do the same, so it's eiter\or not both. You probably also want to set the incoming end character.

 


I don't think you understood wiebe@CARYA's advice. You need to set the TermChar En to TRUE, and the Send End En to FALSE. It looks like you have them reversed.

 

the correct settings.png

0 Kudos
Message 14 of 35
(2,272 Views)

 

Yes, This document that link I has read. And tried to change something.

This issue is still occurring. 

 

After disable all firewall and antivirus protection.

But, In the LabVIEW this issue is still occurs.(VISA Write Error)

 

In The NI MAX the communication is OK.....

 


wiebe@CARYA  已寫:

See How Do I Connect to Ethernet Instruments with NI-VISA? for more options of the TCP\IP VISA resource.

 

Not sure if that's it, and it will be hard to give further advice without the hardware.

 

Try to (temporarily) disable the firewall. It might be blocking LabVIEW.exe (and not MAX).


 

0 Kudos
Message 15 of 35
(2,253 Views)

The architecture of Ethernet connect as below:

Control PC <=====> Anrutsu MT8870A(instrument)

The control PC is direct connect to the instrument via ethernet cable.
There is not use the Router or Hub.
The IP Setting of control PC and the instrument is set the fixed IP.

The Control PC IP Address is: 192.168.1.100
The Instrument IP Address is: 192.168.1.1

Open the Windows command prompt an type "ping 192.168.1.1",
Can got the response from the instrument.

 


@billko  已寫:

If you are using IP addresses in the 192.168.x.x range, I suppose you are using some kind of router.  Are you sure the router isn't sitting at 192.168.1.1???


 

0 Kudos
Message 16 of 35
(2,250 Views)

Thanks for your remind,
I had removed the error case and adjust the settings about the TermChar En to TRUE, and the Send End En to FALSE.

VISA_Write Error.png

 

 


Then re-run this VI. The VISA Write Error message is still shows up.

Below is the trace data via control pc and instrument use NI I/O Trace:


Use LabVIEW VI (Not Work):

 

labview-vi-io-trace.png

 

For Detail Trace log, please refer Capture_VISA_Write_labview.nitrace

 

Use NI MAX(Query response is ok):

max-visa-lan.pngmax-visa-lan_IO.png

For Detail Trace log, please refer Capture_Query_NIMAX.nitrace

 


@WIILE  已寫:

The architecture of Ethernet connect as below:

Control PC <=====> Anrutsu MT8870A(instrument)

The control PC is direct connect to the instrument via ethernet cable.
There is not use the Router or Hub.
The IP Setting of control PC and the instrument is set the fixed IP.

The Control PC IP Address is: 192.168.1.100
The Instrument IP Address is: 192.168.1.1

Open the Windows command prompt an type "ping 192.168.1.1",
Can got the response from the instrument.

 


@billko  已寫:

If you are using IP addresses in the 192.168.x.x range, I suppose you are using some kind of router.  Are you sure the router isn't sitting at 192.168.1.1???


 


 

Download All
0 Kudos
Message 17 of 35
(2,244 Views)

Did you (temporarily) disable the firewall yet? It might very well block all LabVIEW TCP/IP traffic, or allow only certain ports.

0 Kudos
Message 18 of 35
(2,237 Views)

The Windows Firewall has closed.
The antivirus SW (Kaspersky) has close all net protect and all virus protect.

 


wiebe@CARYA  已寫:

Did you (temporarily) disable the firewall yet? It might very well block all LabVIEW TCP/IP traffic, or allow only certain ports.


 

 

0 Kudos
Message 19 of 35
(2,231 Views)

I'd still try to set the port in the VISA resource. When no port is specified, MAX might use a different default then LabVIEW.

 

Other then that, no ideas left.

0 Kudos
Message 20 of 35
(2,226 Views)