LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Error while reading/writing to serial port

Hello !

Bad(ish) news. Although your VI works perfectly
I now have tried to add some more features,
basically writing orders on the PT104 and getting
the answers I want. But again, it doesn't word.

- either I use a property node to see how many bytes
are ready to be read and I get none out of them

- or I force them to read a certain amount of bytes
and then I get an error.

My idea is that the PT104 doesn t understand what
I am telling him. It might be a language problem
(ie I am talking string and he wants hex or something
like that) or he doesn't even listen to me.

I have the PT104 user manual attached that explains
in a very simple way in the section technical reference
how to communicate with the logger. I hope that might
help you on.

Cheers,

Fred
0 Kudos
Message 11 of 13
(907 Views)
Your string control needs to be in hex display mode for you to enter the byte data correctly. To do this right click on your control and select Hex Display.
 
I always wire the output of the No Of Bytes at Serial Port to >0, from here to a case structure, and place the Read in the True case. This will avoid any read errors.
 
Out of interest why do you want to use the protocol instead of the example labview driver? If you continue down this route I would be very careful as you could end up overwriting some critical parameters such as calibration constants if you mix up reads and writes.
 
David
Message 12 of 13
(904 Views)
Everything work perfectly !
I get all the answers I want !

Cheers a lot, you were of great help.

Frederico
0 Kudos
Message 13 of 13
(888 Views)