Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Labview and TWAIT

Labview and TWAIT 6 years 3 days ago #677

  • dreis
  • dreis's Avatar
  • OFFLINE
  • Posts: 6
  • Karma: 0
I am slowly figuring out how to use Labview to drive my SM2316D PLS2 Motor. I can send and receive commands like RW, RP and whatever. I can load in variables, execute some example programs from the user guide. However, I am having trouble with TWAIT. I can tell the Bt flag is high while it moves, but if I use TWAIT or a WHILE BT type loop, it just ignores it. I send two P instructions and it takes off toward the first position for an instant before moving to the second location. If I send only one position, it goes just fine.
Furthermore, when I test all the code in the SMI software it works flawlessly. The issue therefore lies in my Labview code.
Is there inherent timing considerations I should know of when sending and receiving from the smart motor? What about with TWAIT? Has anyone had a similar problem?

Why does
P=-10000
G
TWAIT
P=-1500
G
not work when
P=-10000
G
> wait 5 seconds of real time <
P=-1500
G
work?

Thanks for any help
The administrator has disabled public write access.

Re: Labview and TWAIT 6 years 3 days ago #682

  • csearcy
  • csearcy's Avatar
  • OFFLINE
  • Posts: 459
  • Thank you received: 77
  • Karma: 23
The TWAIT command and WHILE LOOPS can't work over the serial interface. They only work in a program downloaded to the motor. You can do RBt commands to check if the motor is moving... or you can write subroutines in the motor and just call the routine with GOSUBx (with x being 0-999).
The administrator has disabled public write access.
  • Page:
  • 1
Moderators: hsummer, csearcy
Time to create page: 0.268 seconds