limitations on func...
 
Notifications
Clear all

limitations on functionality of commands sent serially?

2 Posts
1 Users
0 Reactions
6,763 Views
(@david.b)
Posts: 5
Active Member Guest
Topic starter
 

Hi,

I'm wondering whether certain looping commands sent serially behave differently than they would if executed within a program resident on a motor. For the moment, I'm trying to see how much I can do with no program loaded on the motor.

I've found I can send a multiple-command string such as this and get the result I expect:

MP PT=1000 VT=1000 ADT=1000 G

But if I try to get a little more fancy, such as either of the following...

MP PT=1000 VT=1000 ADT=1000 G TWAIT RPA
MP PT=1000 VT=1000 ADT=1000 G WHILE Bt LOOP RPA

...the RPA command executes immediately, rather than waiting for motion to complete.

As a further experiment, when I enter the following command string, I get the following result:

x=1 WHILE (x<10) Rx x=x+1 WAIT=2000 LOOP RPA

1
1
1
1
0

where 0 is the current motor position in this case. (What's going on to give me this result?)

Can anyone tell me if sending 'mini-program' strings like this has certain fundamental limitations I should be aware of?

Thanks much,

Dave

 
Posted : 18/07/2014 7:26 am
(@csearcy)
Posts: 316
Reputable Member Guest
 

Flow control commands are not supported over the serial interface. This includes...
WHILE...LOOP
IF...ENDIF
CASE...SWITCH
TWAIT

All flow control is up to the host system when there is no program in the motor.

 
Posted : 18/07/2014 11:08 am
Share: