LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write and read with leybold device

i have a device that mesures pressure THERMOVAC TM22 by LEYBOLD the user's manual is here.

the communication to this device is through its  RS232C port and with the 7-bit ASCII code.

to be clear i need some explaination about writing with 7-bit ASCII code:
the user manual in page 18 and 19 gives me some instruction about what should i write to get mesurements ( ,,MES R TM1 <CR>'' ) but i don't know, shoud i write it as it in the write buffer or what and to read information what should i do?

i did write it as it and an error (-1073807339) in the visa read.

the probleme is that i'm new with labview so after reading some topics in NI forums i found this guy who have a similar probleme as mine with the same error but i didn't understand a lot. So can anyone helpe me plz.

( sorry for may ignorance and my spelling)

 

 

0 Kudos
Message 1 of 27
(3,090 Views)
You aren't sending <CR> are you? That stands for a carriage return and in LabVIEW, you use a \r when the string control is set for \ Codes Display. This is a right click option. Have you verified communication with a terminal emulation program such as hyperterminsl or putty. Verify the port settings and that you have the correct type of serial cable.
0 Kudos
Message 2 of 27
(3,076 Views)

ok i'll try hyper terminal tomorrow but first i need to ask how i write this instruction ( ,,MES R TM1 <CR>'' ) in the write buffer with 7 bit ascci code ?

0 Kudos
Message 3 of 27
(3,065 Views)
You write
MES R TM1\r
Are you using one of the serial examples? Both include the VISA Configure Serial Port.
0 Kudos
Message 4 of 27
(3,053 Views)

i'm using one this VI take a look and tell me if it could do the task:

 

Sans titre.png

0 Kudos
Message 5 of 27
(3,046 Views)
For a single write/read it should be fine but check the display mode of the string control as I already said.
0 Kudos
Message 6 of 27
(3,036 Views)

I saw another serial related thread today,m I think this VI has the same problem.  You should almost never use BytesAtPort to determine the serial read.  This will return immediatley, probably before the instrument has responded.  Instead, enable the termination character when you initialise the port and wire a large number to Bytes To Read.  Then the Viea Read will wait for the termination character and return the proper response.

0 Kudos
Message 7 of 27
(3,028 Views)

sorry but i don't understand what do you mean about "check the display mode of the string control as I already said."
sorry i'm super amateurSmiley Sad

0 Kudos
Message 8 of 27
(3,023 Views)

Right click the string control and set display mode to codes display.  Then you know what you are sending. try my idea too

0 Kudos
Message 9 of 27
(3,019 Views)

thank you guys  for helping meand as you adviced me i did modifiy my VI and i hope this will work, i'll test it tomorrow:fp.jpg

0 Kudos
Message 10 of 27
(3,006 Views)