Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Termination character finding problem

Hello I am communicating with Antenna trainer AT-5000. 

 

The device Seven segment shows values 0 to 999 Max. For example such as 345, 34 679, etc.

 

These random values will convert to ASCII character so that it can compatible.

 

Now expert have to told me that how to find termination character in receiving data. 

 

The termination character will be in numeric or in ASCII????? How to find it.

 

Also how to enable termination character in VISA Read.????

0 Kudos
Message 1 of 36
(10,342 Views)

What is the termination character?  It is usually a Line Feed character (byte value of 10).

 

If you are using a serial port then just use the VISA Configure Serial Port.  One of the inputs is to enable the termination character and another is to set the termination character.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 36
(10,335 Views)

Yes, I will use Serial to USB converter for collection of Data.

 

Please tell me how to find termination character in examplified data such as 23, 456, 756 and 999 is last numeric and I will use converter that convert the numeric to ASCHII Character. 

 

Please tell me what is  Line Feed character (byte value of 10).

0 Kudos
Message 3 of 36
(10,329 Views)
I would suggest you do a Google search for 'ASCII table' and download one. Do you understand what ASCII is? Each character is a single byte (8 bits) so there are a total of 256 possible characters. A serial transmitter will often append a special termination character at the end to signify the data is complete. This might be the special line feed character which is the single byte of 00001010. This is decimal 10 or hex A. When you enable the termination character with the VISA Configure Serial Port, you are telling which character is the actual byte and you are telling the VISA Read to automatically terminate the read when the character is detected. So, if you specify number of bytes to read as something high as 100, your read will automatically terminate when any of your example values are read. You don't do a search for anything and the termination character is not present in the string returned by the VISA Read. You just have the ASCII characters that represent the numeric value that is sent.
Message 4 of 36
(10,323 Views)

Great answer.

 

From your reply, I understand that each and every data  or string in ASCII has same termination character of single byte (8-byte). Am I right????

 

 Secondly, Again my question is same that how to indentify and give that termination character to Visa serial configure.

 

Please tell both of question in detail

0 Kudos
Message 5 of 36
(10,319 Views)
No. The termination character is sent at the end. The firmware for the instrument would typically send x number of ASCII characters and then the termination character - 2\n 35\n 678\n. The \n is one way to represent a line feed.

You have to review the instrument documentation to know what the correct character is. The value of that character is wired to the VISA Configure Serial Port. As has been mentioned, the default is decimal ten. Turn on Context Help and move your mouse over the function. You will see the terminal names and default values. This is just elementary.
0 Kudos
Message 6 of 36
(10,311 Views)

Its mean termination character is coming once at the end of overall string or ASCII Characters.

 

I an making my own hardware that convert number of bits that is sent to seven segmanet display to ASCII Characters.

 

Please tell me how to add termination character to hardware that convert bits to ASCII.

 

Can I end termination character as Enter.?????

0 Kudos
Message 7 of 36
(10,308 Views)
The actual adding of a termination character will depend on what software you are using to write the firmware. That has nothing to do with LabVIEW or any NI hardware.

There is no such thing as an Enter character. You don't see that listed in the ASCII table you downloaded did you? Please do that and take some time for the LabVIEW tutorial before posting again. You'll also need to spend some time with a tutorial for the software you are using to write the firmware.
0 Kudos
Message 8 of 36
(10,305 Views)

Okay I have go through the ASCII Table and got it very well.

 

After reading, I came to know that I can set the termination character as "A". Is it possible

0 Kudos
Message 9 of 36
(10,298 Views)

Haris115 wrote:

After reading, I came to know that I can set the termination character as "A". Is it possible


You want capital A to be the termination character?  That seems really weird to me, but sure.  "A" is just 65 in decimal.

 

The idea of a Termination Character is that you want to use something your know will have absolutely no chance of being in your actual data.  That is why the line feed is often used.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 10 of 36
(10,293 Views)