LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Connect PC to a Clima Temperatur system

Solved!
Go to solution

Yes i need to read string from CPU to PC as shown in the Protocol file the string will contain a set value and actual value. if i put  VISA read after VISA write , Is it good idea?? cause sometime I have error from the VISA read.

 

Thank you 

0 Kudos
Message 11 of 14
(988 Views)

It's very hard to debug a picture. Please attach the actual VI (and also with the subVIs). I see one thing that may cause your errors.

 

The Interface Protocol defines a termination character of ETX (0x03). Use it. Add it to your VISA Configure Serial Port. Do NOT wire the VISA Write byte count to the VISA Read byte count. Instead, wire a very large constant to the byte count. That way, the VISA Read will terminate on the ETX without causing a time out error (assuming everything else is correct).

 

Capture.PNG

0 Kudos
Message 12 of 14
(982 Views)

@SAED123 wrote:

Attached you can find the VI and the Sub VI of the Project 


In addition to what I mentioned before about using the ETX as the termination character:

 

Your main VI has a flat sequence with 9 frames inside a while loop. Think Data Flow instead.

 

Inside the while loop, you are sending the same series of commands over and over again for each loop iteration. Some of these commands only need to be sent once (Set Ramp Up/Down Rate). Others only need to be sent when the values are changed (Set Point Temperature). Plus you don't have any commands to Read Analog Parameters (for displaying/logging the actual temperature). You really should implement this using a State Machine architecture. Search the forum and you will get multiple examples and advice on how to do it. And if you have access to the online training, take it.

0 Kudos
Message 14 of 14
(962 Views)