11-26-2008 08:51 AM
Dear All,
I have done an application with LabView where I communicate to my instrument via RS232. I use the VISA command.
This application is working OK.
Now, here is my problem, my instrument also have an ethernet interface, so I want to be able to communicate by using TCP/IP socket.
The problem is that I did not find in the properties of TCP/IP socket, an equivalent to the "End Mode For writes" of the serial properties.
If I want my instrument understand what I send, I need to add a 0x0A character to the sent string. When I use the RS232, this is done by the "end mode for writes".
I would like to avoid adding manually a 0x0A when I communicate by Ethernet in my whole programm because it is quiet big.
Do you have any idea ?
Thanks a lot for your help.
Best regards,
Solved! Go to Solution.
11-26-2008 12:38 PM
11-26-2008 01:20 PM
Hello,
What you are suggesting is exactly what I want to avoid because in this case I need to change all my programm !! and this is a quite big application.
As far as I have understood, I have to modify every time I use the VISA Write command !!
Any other solution ?
Thanks.
Best regards
11-26-2008 02:37 PM
From the Help:
Member of the TCP/IP Socket class.
Specifies whether to send an END indicator on the last byte of each write operation. This property is relevant only in VISA Write and related operations. The default is TRUE.
On Serial Instr sessions, if this property is set to FALSE, the write transmits the exact contents of the user buffer, without modifying it and without appending anything to the data being written. If this property is set to TRUE, VISA performs the behavior described in the Serial Settings property End Mode for Reads (ASRL End In).
On GPIB, VXI, GPIB-VXI, TCP/IP Instr, and USB Instr sessions, if this property is set to TRUE, VISA includes the 488.2 defined 'end of message' terminator.
What you could try is setting this property and the termination character to 0x0A and see if that works.
Also, this is probably too late but if your program is just using a large number of VISA Writes, you can now see the big advantage in creating an instrument driver where you would only have a handful of VIs to modify.
11-26-2008 03:31 PM
Hello dennis,
I always read the help and look for information before posting on the forum.
I have already set the send end enable to true and define the termchar as 0x0A.
While performing read operation, the operation stop as a 0x0A is received. So it is working correctly.
But, in the help, I understand that the send end enable will send the the 488.2 defined 'end of message' terminator, not necessarely the termchar character.
In order to investigate, I have use the NI Spy, and the result is different when I send manually 0x0A (I see it is the write operation). If I don't add the 0x0A character and even if the termchar = 0x0A & send end enable = true, I cannot see the 0x0A in the NI Spy.
Actually, I use a driver for this instrument, but as it is a very complex instrument, if I want to modify the driver, I have to modify hunderds of vi's which I would like to avoid if possible.
Thanks for your help.
Best regards,
11-26-2008 03:33 PM
11-26-2008 04:01 PM
11-26-2008 04:10 PM
Thanks a lot for your help.
For my understanding, what is the END character in the 488.2 standard ?
11-26-2008 06:48 PM
04-08-2009 09:58 AM