LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you send the Ascii-2 protocol to the Temperature and Humidity Chamber?

Hello
I want to control weiss company's chamber through LabVIEW.
I found a data sheet with Ascii protocol that can control the chamber.

So I made an Ethernet connection through NI MAX, and I entered the Chamber's ip address and port number into the tcp open connection.
You also used TCP Write to enter commands in the data sheet along with the carriage return constants.
However, the output of TCP read does not produce the value I want.

Is my VI correct?
How do I enter ASCII-2 PROTOCOL?

Attached is the VI I made, and I attach the picture of connecting the Chamber through NI MAX and the data sheet of the Chamber.

Thank you in advance for your help.

 

1.PNG2.PNG3.PNG

0 Kudos
Message 1 of 9
(3,535 Views)

Hi seongmo,

 


@seongmo1476 wrote:

However, the output of TCP read does not produce the value I want.
Is my VI correct?
How do I enter ASCII-2 PROTOCOL?

2.PNG


When the output is not the expected one then your VI is surely not correct…

 

General advice: The protocol is written badly, you should ask Weiss for a better one! Currently it contains misleading information, and even some German (aka "non-translated") important remarks in an otherwise English text…

 

Specific advice: Weiss describes the command as "$01I". That "I" character surely is not the vertical bar char (ASCII 124, |), but instead you should try either a capital i (ASCII 73, I) or the non-capital L (ASCII 108, l)…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 9
(3,491 Views)

Hi GerdW

 

ok.. i understand!

 

I'll try and respond again.

0 Kudos
Message 3 of 9
(3,486 Views)

Why are you so sure that is not the problem.  The manual is unclear as to exactly what that character is.

 

Other commands use capital letters.  It seems unlikely that this one command would use a vertical bar symbol!

0 Kudos
Message 4 of 9
(3,483 Views)

Hi GerdW

 

I tried both i and l.
L(ASCII 108, l) was printed with the same data as | (ASCII 124, |) but i (ASCII 73, I) was different.

When i (ASCII 73, I) was entered, the code worked for 10 seconds, and the following error was output.

What's the problem with this?

 

error2.PNG

error1.PNG

0 Kudos
Message 5 of 9
(3,475 Views)

Hi seongmo,

 


@seongmo1476 wrote:

When i (ASCII 73, I) was entered, the code worked for 10 seconds, and the following error was output.
What's the problem with this?


Did you read the explanation for that error?

The code didn't "work for 10s", it just waits for 10s for a response of your device - which didn't arrived…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 9
(3,465 Views)

Did you have any further progress with this? I too am trying to talk to a Weiss chamber.

0 Kudos
Message 7 of 9
(2,999 Views)

HI!

 

Try to change the mode of TCP read to Standard and loop it with the exit condition, the concreted string contains the <CR> character. I tried previous, but the CRLF mode does not fit with the Weiss chambers, cause it requires only CR character

0 Kudos
Message 8 of 9
(1,650 Views)

Alternatively you could try to use NI-VISA with a VISA TCP::xx.xx.xx.xx::port::SOCKET resource name.

VISA supports single termination character detection (but not double CRLF, however you can usually fake that by letting it detect LF) and then you can concentrate on the communication rather than trying to figure out how to shoehorn your device communication into the constraints of the native TCP node termination modes.

 

One caveat though, native TCP is automatically built into LabVIEW. NI-VISA is always an additional driver installation if you want to distribute your program to other machines than on which you develop it.

Rolf Kalbermatter
My Blog
0 Kudos
Message 9 of 9
(1,644 Views)