controlling smartmo...
 
Notifications
Clear all

controlling smartmotor (sm23165d) using Labview

5 Posts
1 Users
0 Reactions
10.1 K Views
(@dssiitb)
Posts: 4
New Member Guest
Topic starter
 

I have a couple of animatics smartmotors (sm23165d) daisy-chained.

I successfully connected them to Labview using an RS232 serial port connection with the help of this forum ! Thank you 🙂

I can write commands to the motor in realtime using labview now. But my major problem is reading the position of the motor !
I got to know that there has to be some delay between the 'read' command and actually reading the value

so, I have the following problems:
1) How can I read position in realtime ?
2) When I give the read command in 'visa write' and then after a delay, I use 'visa read' to read, I get all my commands sent back through the buffer and then, at the end, there's the value of position. What do I do to get only the position in the buffer ? I tried using the ECHO_OFF but that didn't help; instead, as soon as I wrote ECHO_OFF just before RPA to read position, my daisy chaini stopped working i.e. motor 2 on the chain stopped getting commands even when addressed properly (I dont know a lot about ECHO, what iit means, how it's meant to be used, where in the code are you supposed to write it etc.)

This forum has been really helpful until now.
It would be great if someone could please help me with this.

 
Posted : 27/11/2014 6:35 am
(@csearcy)
Posts: 0
New Member Guest
 

The ECHO must be enabled for the daisy-chain to function. The only way to "eliminate" the command being echoed back with the response(using ECHO_OFF) is to have each motor on it's own serial port(no daisy-chain).

If your application can not have each motor on a separate serial port, you must be able to "strip off" the response characters. I don't know how this is done with Labview, but I have heard it is possible to do. You can depend on the fact that the echoed response will have the same number of characters as the command sent.

If you are successful in "stripping off" the response... please post your solution... as many others will benefit! 😉

Thanks,
Chuck

 
Posted : 30/11/2014 6:43 pm
(@dssiitb)
Posts: 4
New Member Guest
Topic starter
 

Sadly, I haven't been able to do that. I'm currently only 'writing' and not 'reading' from labview. But I have another query about time-lag.

When I control them using their own software (SMI), there doesn't seem to be a time lag between me giving the command and the motor performing the command. However, when I give ascii commands to the motor via labview (VISA write), there is an observable time lag (let's say, for example, when I click 'stop' and it actually stops)

Has anyone faced this problem ? Does anyone know about it ?
If yes, could you give me approximate time lag values for controlling a smartmotor using SMI and LabVIEW (I'm guessing the values for both would be different)?

 
Posted : 10/12/2014 6:04 am
(@dssiitb)
Posts: 4
New Member Guest
Topic starter
 

Sadly, I haven't been able to do that. I'm currently only 'writing' and not 'reading' from labview. But I have another query about time-lag.

When I control the motor using its own software (SMI), there doesn't seem to be a time lag between me giving the command and the motor performing the command. However, when I give ascii commands to the motor via labview (VISA write), there is an observable time lag (let's say, for example, when I click 'stop' and it actually stops)

Has anyone faced this problem ? Does anyone know about it ?
If yes, could you give me approximate time lag values for controlling a smartmotor using SMI and LabVIEW (I'm guessing the values for both would be different)?

 
Posted : 11/12/2014 5:42 am
(@csearcy)
Posts: 316
Reputable Member Guest
 

I do not have LabVIEW, but I have heard that many have used it with the SmartMotor. I have not heard any reports of this lag time.
The commands received by the SmartMotor have a very high priority. I don’t have an exact number for how long a Stop command would take to process, but depending on baud rate, after the command is received by the motor, I would say it begins to stop within 10msec.

 
Posted : 11/12/2014 9:45 am
Share: