LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple termination characters

Highlighted

 

Hey,

 

I have an instrument I am able to communicate through  hyper-terminal but less so through LabView.

 

I digg around and found the following:

Why Does My Serial Instrument Work in Hyperterminal But Not in LabVIEW or VISA Test Panels in MAX?

 

This attribute the problem to delay issues or \r\n termination character that hyper terminal appends at the end.

 

The example file do works - but I don't understand how!

 

when I view the sent command in the string to write (when viewed as code display) there is a termination \r\n to my input string.  but I don't see how they are appended in the block diagram? and  how is it related to sent characters one by one and not as a hole string?

 

please can anyone explain this?

 

 

0 Kudos
Message 1 of 7
(762 Views)

It is just there as part of the command.

 

If you programatically want to add it, use Concatinate String with the End Of Line Constant.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 2 of 7
(759 Views)

how exactly is it part of the command?

 

for example: my instrument is laser control. the command  "$LTEMP ?"  reads the current temperature.

 

In this example file - when I write the command as above - it's sent the command, single byte at the time.  and read the temperature.  this is beacuse is is somehow appends \r\n when viewd in code display mode.

 

if I generate my own write-read file but send the string as a whole instead of byte by byte it doesn't show similar results and does not apend EOL characters.

 

Why?

0 Kudos
Message 3 of 7
(750 Views)

@mrish wrote:

how exactly is it part of the command?


In the example, the string is the command.  The string just has the EOL, making it part of the command string.

 

For your situation, you really should be doing something like this:


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 4 of 7
(742 Views)

thanks,

 

I understand your answer, I will try it and I'm sure you right.

 

but my question in more for my understanding than for solving a problem.
 

in the formal single byte write read - in the link I've attached. where is EOL is appended - I do not see something like that in the block diagram.

0 Kudos
Message 5 of 7
(738 Views)

The string control has \codes set for its view.  It has a string to write with \r\n included at the end of it.

0 Kudos
Message 6 of 7
(732 Views)

mrish wrote:

in the formal single byte write read - in the link I've attached. where is EOL is appended - I do not see something like that in the block diagram.


That's because it is not on the block diagram.  It is part of the data in the string, as you have already stated.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
0 Kudos
Message 7 of 7
(717 Views)