03-24-2014 07:09 AM
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?
03-24-2014 07:20 AM
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.
03-24-2014 07:27 AM
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?
03-24-2014 07:38 AM - edited 03-24-2014 07:38 AM
@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:
03-24-2014 07:41 AM
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.
03-24-2014 07:47 AM
The string control has \codes set for its view. It has a string to write with \r\n included at the end of it.
03-24-2014 08:45 AM
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.