Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

EOS character not appended?

I am attempting to write an application that in part will control an Anritsu MP1570A Sonet Analyzer. This instrument departs from the IEEE standard in that it requires tx or rx messages to be terminated with a carriage return <\n>.

In the custom properties for the NI GPIB Control, there is an "advanced" tab under which one of the options available defines the EOS character. From this dropdown list I selected "\10(LF)", (10 corresponds to the ASCII value of a linefeed.) I also checked the "EOS ends read" and "Append EOS on write" options.

After selecting the correct device address and changing to the "test" page of the properties, I find that the instrument still does not respond to *IDN?, and upon examination of the captured data with
NI Spy, I find that the linefeed has not been appended.

If, on the test page of the control properties, I type *IDN?\n the instrument responds correctly. From what I can tell the GPIB control is ignoring the settings I entered for the EOS character, but I'm hoping that someone can point out something I've overlooked.

In working developing code for this instrument I have so far been manually appending chr$(10) to every string. I'm not sure if that has anything to do with problems I've been having associated with command timing, but I'm sure it has not helped.

Thanks in advance to anyone with advice!

JG
0 Kudos
Message 1 of 5
(5,529 Views)
Since the intrument requires the message to be terminated with a carriage return, you must use the "\13 (CR)", which corresponds to the ASCII value of carriage return, for the EOS character property of the GPIB control.

I think the reason the intrument responds to the *IDN?\n command is because \n is a combination of carriage return and line feed.

Hope that helps.

Abhishek Ghuwalewala
Abhishek Ghuwalewala | Measurement Studio | National Instruments
0 Kudos
Message 2 of 5
(5,529 Views)
Hi Jerry,
The test page does not append the EOS character, however if you do it with source code, it will - without you having to add the character...

For example if you do the following in code..
CWGPIB1.Configure
CWGPIB1.Write "*IDN?"
The EOS string (if there is one specified) will automatically be appended to the outgoing string. In NI-SPY it will show up as a dot, i.e. "*IDN?." and the count will be 6 bytes (not 5).
Further, if you dbl-click on the ibwrt statement, and look at the buffer tab, then you should see the hex code for your outgoing string with the EOS character attached...
I'm using Measurement Studio 6.0 to test this..
Hope that helps some...
Nandan Dharwadker
Staff Software Engineer
Measurement Studio Hardware Team
0 Kudos
Message 3 of 5
(5,529 Views)
You are correct that ASCII(10) is a linefeed, but I was mistaken about the nomenclature. A linefeed character is what is required.

JG
0 Kudos
Message 4 of 5
(5,529 Views)
Thanks, I'll give it a try.

JG
0 Kudos
Message 5 of 5
(5,529 Views)