Quantcast
Channel: Instrument Control (GPIB, Serial, VISA, IVI) topics
Viewing all articles
Browse latest Browse all 5565

Truncated serial data

$
0
0

Hi there.  I've inherited a system that has some issues I'm trying to resolve.  I'm new to serial communication, so I'm hoping someone here can point me in the right direction.  This system uses VISA to communicate with a Animatics SmartMotor from Moog.   The motor program opens a RS232 serial communication channel and then runs a loop every 100ms that does two things:  (1) Looks for a new position command from the receive buffer (and moves to the new position if it sees one) and (2) outputs the current motor position + a carriage return back to the LabVIEW system.  Note that the system uses a USB to RS232 adapter, so that the motor plugs into the adapter and the adapter plugs into the USB port of the computer.

 

There are 2 things happening that lead me to believe I'm having some data loss during communication.  

 

First, occasionally the motor will go to the wrong position leading me to believe it is not receiving the correct new position.  This is a problem I need to solve.

 

Second, when I look at the position data from the motor after it comes back to my vi, it randomly drops digits.  This is an annoyance, but not critical to system performance.  So the data might looks something like this for an actual position of 3333.  

 

3333

3333

3333

3333

333

33

3

33

333

3333

3333

3333

3333

etc.

 

I've attached a txt file of the SmartMotor code for anyone that wants to check it out along with a stripped down version of the LabVIEW vi's.  SM-Test.vi is the top level vi.  Any thoughts?

 

Thanks in advance!


Viewing all articles
Browse latest Browse all 5565

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>