Welcome, Guest

TOPIC: controlling smartmotor (sm23165d) using Labview

controlling smartmotor (sm23165d) using Labview 4 years 2 weeks ago #1653

  • dssiitb
  • dssiitb's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 1
  • Karma: 1
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.
The administrator has disabled public write access.
The following user(s) said Thank You: csearcy

Re: controlling smartmotor (sm23165d) using Labview 4 years 2 weeks ago #1654

  • csearcy
  • csearcy's Avatar
  • OFFLINE
  • Moderator
  • Posts: 459
  • Thank you received: 77
  • Karma: 23
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
Last Edit: 4 years 2 weeks ago by csearcy.
The administrator has disabled public write access.

Re: controlling smartmotor (sm23165d) using Labview 4 years 4 days ago #1672

  • dssiitb
  • dssiitb's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 3
  • Thank you received: 1
  • Karma: 1
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)?
The administrator has disabled public write access.

Re: controlling smartmotor (sm23165d) using Labview 4 years 4 days ago #1674

  • csearcy
  • csearcy's Avatar
  • OFFLINE
  • Moderator
  • Posts: 459
  • Thank you received: 77
  • Karma: 23
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.
The administrator has disabled public write access.
Time to create page: 0.239 seconds
Powered by Kunena Forum