LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Serial communication problems with numbers >99999

Hi,

 

At school we're trying to interface a SMI smartmotor trough LabVIEW. 

We're using the "advanced Serial Write and Read" example vi to communicate with the stepper motor. 

 

The data we send to the motor is build up like this: 

 

A=100

V=-300000

P=10000

 

Where A stands for acceleration, V for velocity and P for position. 

This way of working goes well as long as the position is smaller than 100000. As soon as we enter positions higher than 99999 the motor stops at position 99999.

We already tried to communicate with the motor via the standard software of SMI, and there it's possible to go to positions higher than 99999. So the problem is in LabVIEW I think.

 

My question is now if there is a solution for this problem? I'm only a beginner with LabVIEW, so I really don't know what the mistake could be...

 

The settings of the "advanced Serial Write and Read" vi are next ones: 

-baud rate: 9600

-data bits: 8

-parity: none

-stop bits: 1.0

-flow control: none

-XON character: 11

-XOFF character: 13

-Input buffer size: 4096

-End write on termination character: true

-End read on termination Character: true

-termination character: A

-timout: 10000ms

 

Hopefully someone can help me on this...

 

Thanks in advance,

 

Gieljan

 

0 Kudos
Message 1 of 9
(2,273 Views)

Did you put a probe on the string input to write to serial port? The problem could be in the way you are creating the string.

=====================
LabVIEW 2012


0 Kudos
Message 2 of 9
(2,267 Views)

thanks for your quick response! 

 

I've put a probe after the string creation and I see the string is created correctly. 

I've added a screenshot in attachment. 

 

Maybe it is another problem?

 

Gieljan

0 Kudos
Message 3 of 9
(2,259 Views)

I have not worked with this particular smart motor but I would think there is a good chance that theare is a software limit of 99999 which is probably setable via a serial command as well.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 4 of 9
(2,256 Views)

a 30 sec search yields http://www.animatics.com/en/supports/knowledge-base/smartmotorkb/command-sets.html

there are inface software limits in the command set: SLD Disable software travel limits send this command and retry your move.

good luck

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 5 of 9
(2,243 Views)

I'm not sure this will solve the problem because we only have this problem when we use LabVIEW...

If we use the standard software, wich is delivered with the motor, we don't have this problem... 

 

Anyway I will try this when I'm at school again. 

 

Thanks for the tip!

0 Kudos
Message 6 of 9
(2,232 Views)

See Pauls reply. It is possible that the other software is configuring the motor differently.

=====================
LabVIEW 2012


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

Allright, I'll try this at school and report afterwards. 

 

Thanks for the quick help!

 

Gieljan

0 Kudos
Message 8 of 9
(2,205 Views)

If there is a software limit you can set this using

 

SLN and SLP (sets + and - limits).  Many apps this is a good idea to use for safety (protect both motor and people) issues.  You dont want to rely on a motor hw limit which can fail (and often does)

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 9 of 9
(2,185 Views)