Resume from emergency stop

6 years 1 month ago #29529413 by BG
I have a script that does the following.
1. Detects a pulse input via the PI query
2. If there is no pulse input, PI query = 0 the motor is commanded to a home position and the controller is placed into an emergency shutdown state via the EX command.
3. Once the pulse input becomes active again, PI query >0, the emergency shutdown condition is released via the MG command, and pulse control resumes.

My question is regarding the MG command. With the motor at the home position, and having released the emergency shutdown state with the MG command, the pulse control will not begin again until I command (what I assume to be) the home position. Once that home position is commanded I obtain full control again with the pulse signal. Is this expected behavior? Is it possible for the pulse command to be fully active once the MG command is issued without having to go to the position where it was shutdown at?

Please Log in or Create an account to join the conversation.

6 years 1 month ago #29529414 by Griffin Baker
Replied by Griffin Baker on topic Resume from emergency stop
Are you operating an open loop or a closed loop mode?

Please Log in or Create an account to join the conversation.

6 years 1 month ago #29529421 by BG
Replied by BG on topic Resume from emergency stop
Operating in closed loop position tracking mode

Please Log in or Create an account to join the conversation.

6 years 1 month ago #29529422 by Griffin Baker
Replied by Griffin Baker on topic Resume from emergency stop
In general, when the controller starts up in closed loop mode, it looks at the feedback and tries to home. Since the output is cut off until the pulse input goes higher than 0, the fets are turned on, and most likely trying to go to the home position as soon as the emergency stop is lifted.

Please Log in or Create an account to join the conversation.

6 years 1 month ago #29529427 by BG
Replied by BG on topic Resume from emergency stop
I may not have been clear. My home position is not 0 in converted units. My home position is actually -860. So my script will detect a loss of pulse input, command the motor to the -860 position, then command an emergency stop. When the pulse input returns, the emergency stop is cleared via the MG command, however I do not have pulse control. I can sweep the pulse command from -500 to 1000 and the motor will not move. Once the pulse command reaches -600 the motor will jump to that position and I'll have full control again.

Please Log in or Create an account to join the conversation.

6 years 1 month ago #29529431 by Griffin Baker
Replied by Griffin Baker on topic Resume from emergency stop
Investigating the issue, so please be patient. Thanks.

Please Log in or Create an account to join the conversation.

6 years 1 month ago #29529452 by Griffin Baker
Replied by Griffin Baker on topic Resume from emergency stop
Since you are going into an E-stop while in closed loop mode, try putting the controller into open loop mode when the estop is pressed, and then when it is unlatched, place the controller into closed loop again.

You can do this from the console by sending the following commands.

Change to open loop mode
^mmod 1 0
change to closed loop mode
^mmod 1 4

Please Log in or Create an account to join the conversation.

6 years 1 month ago #29529457 by BG
Replied by BG on topic Resume from emergency stop
I understand the concept that you're trying to achieve but I still not getting a desirable result. With the suggestion you provided I'm not able to achieve a transition to closed loop mode once the signal returns without undesirable motion in open loop mode.

I'm having some trouble calling the MMOD command from the microbasic script. When the MMOD command is called by "setcommand(_MMOD,1,0)" the controller will reset. The console will then indicate "Starting..." and then show the firmware ID. However, when I call these commands through the console there is no problem with resetting. Is the MMOD command allowed to be called from within a subroutine?

Inspecting the state of the controller further shows the following:
- If I lose a pulse input I go to a defined position and command an estop. Querying the runtime status flag, ?FM, through the console reports FM=4 which I think means "safety stop active". Additionally, the closed loop error reports a non zero value, 32 for example. The run tab shows that the FETs are off
- Once the pulse input becomes active again, the estop is released via the MG command, however pulse control is still inactive. The FM querie still reports FM=4, the error still reports 32 and does not change with the pulse command, and the run tab shows that the FETs are on.

If you'd like I can send you my microbasic script and controller configuration.

Please Log in or Create an account to join the conversation.

6 years 1 month ago #29529458 by Griffin Baker
Replied by Griffin Baker on topic Resume from emergency stop
It is setconfig(_mmod,1,0)

Please Log in or Create an account to join the conversation.

6 years 1 month ago #29529459 by BG
Replied by BG on topic Resume from emergency stop
ahh! That helps, my mistake. Changing that command resulted in the desired behavior. Thanks!

Please Log in or Create an account to join the conversation.

Time to create page: 0.110 seconds