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

TOPIC: Labview and TWAIT

Labview and TWAIT 4 years, 2 months ago #677

  • dreis
  • 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

Re: Labview and TWAIT 4 years, 2 months ago #682

  • csearcy
  • OFFLINE
  • Posts: 480
  • 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).
  • Page:
  • 1
Moderators: hsummer, csearcy
Time to create page: 0.41 seconds