Notifications
Clear all

Labview and TWAIT

2 Posts
1 Users
0 Reactions
11.2 K Views
(@dreis)
Posts: 6
Active Member Guest
Topic starter
 

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

 
Posted : 16/07/2012 11:54 am
(@csearcy)
Posts: 316
Reputable Member Guest
 

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).

 
Posted : 16/07/2012 1:34 pm
Share: