Little Step-U Quirk
Bill C Cooley
Posts: 18
Hello Everyone,
I wan to share a short Email conversation I had with TLA Microsystems The maker of the 'Little Step-U'.
[h=3]Bill Cooley <cooleybillc@gmail.com>[/h]
3:07 PM (21 hours ago)
to Steve
Hi Steve, thanks for answering my rookie questions.
For the most part my project will be using the 'D' type instruction
Stepper.str(string("{D1640}"))
[FONT=arial, sans-serif]But I also have a jog function where an operator holds down a forward or reverse button and I have it moving slowly in that direction... like this
[FONT=arial, sans-serif]
[/FONT]
[FONT=arial, sans-serif]PRI JogForward[/FONT]
[FONT=arial, sans-serif]
[/FONT]
[FONT=arial, sans-serif] repeat[/FONT]
[FONT=arial, sans-serif] if ina[7]<>0 'Endless loop waiting for Forward Jog Button P7 tp go high[/FONT]
[FONT=arial, sans-serif] OutA[12] := 1 'If pin 7 goes high then pulse pin 12 and[/FONT]
[FONT=arial, sans-serif] OutA[13] := 1 'and set pin 13 high for forward Direction[/FONT]
[FONT=arial, sans-serif] WaitCnt(1_000_000 + Cnt) [/FONT]
[FONT=arial, sans-serif] OutA[12] := 0[/FONT]
[FONT=arial, sans-serif] WaitCnt(1_000_000 + Cnt) [/FONT]
[FONT=arial, sans-serif]
[/FONT]
[FONT=arial, sans-serif]
[/FONT]
[FONT=arial, sans-serif]I get to that mode like this[/FONT]
[FONT=arial, sans-serif]
[/FONT]
[FONT=arial, sans-serif]PRI SafetyFirst
repeat 'Endless Loop Waiting for Case Open P6 to go High
if ina[6]<>0 'If Pin 6 goes High (case open) then
serial[0].str(string("{S}")) 'Change to Pulse Mode (effectively disabling Radio Inputs)
OutA[17] :=0 'Blue LED On in Jog Mode / Safe Mode / Case Open
OutA[16] :=1 'Green LED Off in Jog Mode
OutA[15] :=1 'Red LED Off in Jog Mode
else 'When case closes then
serial[0].str(string("{R}")) 'Return to Serial Mode
I told you all that Smile, even though I know your not a Spin guy, to ask you Once the S command has been sent to go to Remote mode, what happens if a D command is sent before the R command, returning the LS-U to serial mode? I'm hoping it will be ignored.
Bill Cooley
[/FONT]
[/FONT]
[h=3]steve@tla.co.nz[/h]
1:20 AM (11 hours ago)
to me
Hi Bill,
You got me on that one. I had to go back to the source code and look and then check on a
board to be sure.
Even when it's in Step/Dir mode ({S}) it will still respond to serial commands such as {D}. It
will do the number of steps commanded by the {D} command and then remain in Step/Dir
mode.
I can't say that I like that behaviour. Not so much for the {D} command but commands {F}
through {K} use the IP pins to force a stop so the action could be unpredictable. In my mind
it's a bug but you're the first person to ask about it since 1999 so it will stay as it is.
You can prevent it being a problem in your code by having a variable that you set to being
TRUE when you change to pulse mode and then FALSE when you return to serial mode.
Then just before the line that sends the {D} command, have the statement "if PULSE_MODE
== FALSE then...{D}" or whatever the syntax is for Spin.
Hope that helps,
Best Regards,
Steve.
I wan to share a short Email conversation I had with TLA Microsystems The maker of the 'Little Step-U'.
[h=3]Bill Cooley <cooleybillc@gmail.com>[/h]
3:07 PM (21 hours ago)
to Steve
Hi Steve, thanks for answering my rookie questions.
For the most part my project will be using the 'D' type instruction
Stepper.str(string("{D1640}"))
[FONT=arial, sans-serif]But I also have a jog function where an operator holds down a forward or reverse button and I have it moving slowly in that direction... like this
[FONT=arial, sans-serif]
[/FONT]
[FONT=arial, sans-serif]PRI JogForward[/FONT]
[FONT=arial, sans-serif]
[/FONT]
[FONT=arial, sans-serif] repeat[/FONT]
[FONT=arial, sans-serif] if ina[7]<>0 'Endless loop waiting for Forward Jog Button P7 tp go high[/FONT]
[FONT=arial, sans-serif] OutA[12] := 1 'If pin 7 goes high then pulse pin 12 and[/FONT]
[FONT=arial, sans-serif] OutA[13] := 1 'and set pin 13 high for forward Direction[/FONT]
[FONT=arial, sans-serif] WaitCnt(1_000_000 + Cnt) [/FONT]
[FONT=arial, sans-serif] OutA[12] := 0[/FONT]
[FONT=arial, sans-serif] WaitCnt(1_000_000 + Cnt) [/FONT]
[FONT=arial, sans-serif]
[/FONT]
[FONT=arial, sans-serif]
[/FONT]
[FONT=arial, sans-serif]I get to that mode like this[/FONT]
[FONT=arial, sans-serif]
[/FONT]
[FONT=arial, sans-serif]PRI SafetyFirst
repeat 'Endless Loop Waiting for Case Open P6 to go High
if ina[6]<>0 'If Pin 6 goes High (case open) then
serial[0].str(string("{S}")) 'Change to Pulse Mode (effectively disabling Radio Inputs)
OutA[17] :=0 'Blue LED On in Jog Mode / Safe Mode / Case Open
OutA[16] :=1 'Green LED Off in Jog Mode
OutA[15] :=1 'Red LED Off in Jog Mode
else 'When case closes then
serial[0].str(string("{R}")) 'Return to Serial Mode
I told you all that Smile, even though I know your not a Spin guy, to ask you Once the S command has been sent to go to Remote mode, what happens if a D command is sent before the R command, returning the LS-U to serial mode? I'm hoping it will be ignored.
Bill Cooley
[/FONT]
[/FONT]
[h=3]steve@tla.co.nz[/h]
1:20 AM (11 hours ago)
to me
Hi Bill,
You got me on that one. I had to go back to the source code and look and then check on a
board to be sure.
Even when it's in Step/Dir mode ({S}) it will still respond to serial commands such as {D}. It
will do the number of steps commanded by the {D} command and then remain in Step/Dir
mode.
I can't say that I like that behaviour. Not so much for the {D} command but commands {F}
through {K} use the IP pins to force a stop so the action could be unpredictable. In my mind
it's a bug but you're the first person to ask about it since 1999 so it will stay as it is.
You can prevent it being a problem in your code by having a variable that you set to being
TRUE when you change to pulse mode and then FALSE when you return to serial mode.
Then just before the line that sends the {D} command, have the statement "if PULSE_MODE
== FALSE then...{D}" or whatever the syntax is for Spin.
Hope that helps,
Best Regards,
Steve.