LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial problem from heck

I'm reading an encoder serially to track angular position. My limits are +/- 169560 count from the encoder. Everything works fine until I go less than -99999 then everything goes bonkers! Everything works fine greater than +99999. I've set significant digits, different string to number conversions, etc. This problem is so strange that it affects other vi's that monitor my velocity! Thanks in advance.
 
PaulG.
7.1.1/XP
PaulG.
Retired
0 Kudos
Message 1 of 5
(2,807 Views)

Without seeing your code it is kind of hard to give you an answer. Does the encoder have a test program that you could monitor with portmon?? Or will it talk to hyperterminal??

 

 

 

0 Kudos
Message 2 of 5
(2,788 Views)
It is transferring the information using ASCII, hex, or some other strange method?  Try to feed the information into the serial info to number and see what comes out. 
Matthew Fitzsimons

Certified LabVIEW Architect
LabVIEW 6.1 ... 2013, LVOOP, GOOP, TestStand, DAQ, and Vison
0 Kudos
Message 3 of 5
(2,782 Views)
Everything works fine. Position and velocity control, etc. It's only when I try to receive an encoder value less than -99999.
PaulG.
Retired
0 Kudos
Message 4 of 5
(2,774 Views)
Hi Paul,

I agree with the others here that we need a bit more info in order to help with the problem.  If the manufacturer provided software for it that would be the best way to confirm that the device is working properly.  Also, tell us what format the data is sent in (For Example, is -99999 actually sent as the ascii string "-99999" or in a binary format?).

Let us know some more detail and we will all be happy to help out.

Jason S.
Applications Engineer
National Instruments
0 Kudos
Message 5 of 5
(2,744 Views)