Invoke safety stop from code (HDC2450S)
- mjdesrosiers
- Topic Author
- Offline
- Posts: 11
- Thank you received: 0
I've got the basics of my script working the way I want, but I can't figure out a way to make the script invoke a safety stop. I'm attempting to augment my mechanical braking with the dynamic braking in the Roboteqs. I can see that safety stops can be triggered by digital inputs, but I can't see how to make my MicroBasic code invoke this. Is it possible?
Please Log in or Create an account to join the conversation.
- Griffin Baker
Please Log in or Create an account to join the conversation.
- mjdesrosiers
- Topic Author
- Offline
- Posts: 11
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Griffin Baker
example
dim sf as integer ' sf = safety stop
top: 'label header
sf = getvalue(_DI, 1) ' queries digital input 1
if sf = 1 then 'begins comparison check against digital input status
Print("Safety stop enabled \r")
else
print("Safety stop not enable \r")
end if
wait(10) ' wait 10 mS
goto top ' Loop sequence top label header
Please Log in or Create an account to join the conversation.
- mjdesrosiers
- Topic Author
- Offline
- Posts: 11
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Griffin Baker
setconfig(_dina, 1, 0) tells digital input safety stop to be off.
Please Log in or Create an account to join the conversation.
- mjdesrosiers
- Topic Author
- Offline
- Posts: 11
- Thank you received: 0
Digital Input Action
This parameter sets the action that is triggered when a given input pin is activated. The
action list includes: limit switch for a selectable motor and direction, use as a deadman
switch, emergency stop, safety stop or invert direction. Embedded in the parameter is the
motor channel(s) to which the action should apply.
Syntax: ^DINA cc (aa + [mm])
~DINA [cc]
Where: cc = Input channel number
aa = 0 : no action
1 : safety stop
2 : emergency stop
3 : motor stop
4 : forward limit switch
5 : reverse limit switch
6 : invert direction
7 : run MicroBasic script
8 : load counter with home value
mm = mot1*32 + mot2*64
Default Value: 0 = no action for each input
Example: ^DINA 1 33 = Input 1 as safety stop for Motor 1. I.e. 33 = 1 (safety stop)
+ 32 (Motor1)
Please Log in or Create an account to join the conversation.
- Griffin Baker
Mine had reported back 17 because I forgot to check channel 1 motor.
Please Log in or Create an account to join the conversation.