LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Communication over TPC/IP without using VISA drivers?


@AntonioNI wrote:

Ok, Im trying out again and I have found something interesting.

 

Im able to send the commands via TCP with labview but it does not execute them. However, the last command I seend via pressing "send" in the atached figure 2 is beeing correctly executed by the device whenever I send another command (like the ID command) via pressing "write" or "query" with NI MAX (figure 3), and the instrument complains with a error message in the screen (figure 4).

 

It's like the command is correctly send and "stored" by the instrument but not executed until the NI MAX sends some kind of trigger that im missing... At least I know that the command can be send correctly via TCP write function.


Take a look at the Title bar message. Your connection is TCPIP0::169.254.31.8::inst0::INSTR. You did not create a raw socket connection. Otherwise it would be in a different  format.

 

Capture.PNG

 

NI Help.PNG

 

I believe that you may have used the "AUTO-DETECT" in NI MAX which sets the connection up as a VXI-11 INSTR. That connection works fine in NI MAX but you really want to test out the IP/Port 5555 connection. Choose "Manual entry" to create the Raw Socket. So this leads me to ask, are you 100% positive that the port number 5555 is correct? After you enter the IP address and port number when creating the Raw Socket, there is a "VALIDATE" button. Press it and see if your port is valid.

 

socket.PNG

 

0 Kudos
Message 11 of 13
(1,420 Views)

Your rigth, is not a socket, however port 5555 is correct and is the only port I can successfully open a raw socket connection in NI MAX (have already tryed). However, when using the socket config in NI MAX the instrument does not respond to the same commands that work with NI MAX and VXI-11 protocol. So that probably means my instrument just does not work with raw socket, we will try with another function generator which does support Raw Socket connection, as this migth be the problem.

 

The funny part is that when I send a comend with labview TCP function it does nothing, but as soon as I send a command over NI MAX, then the instrument executes the command sent by labview xD.

0 Kudos
Message 12 of 13
(1,414 Views)

@AntonioNI wrote:

 

The funny part is that when I send a comend with labview TCP function it does nothing, but as soon as I send a command over NI MAX, then the instrument executes the command sent by labview xD.


That's probably because MAX uses VISA and automatically sends the proper termination character which tells the device on the other side to validate, the information in its buffer then act on the information if it is a valid command (Just like everyone has been trying to tell you)


"Should be" isn't "Is" -Jay
Message 13 of 13
(1,399 Views)