Siemens SCL programming problem summary and solution 1

1. The problem that the return to original completion signal is set to True consistently

After using the MC_Home command to make the axis homing once, the system flag <axis name>.StatusBits.HomingDone will be set to TRUE, and it will remain. It will be FALSE unless it is disabled, so if you use this pin to make a judgment, it can only be valid once.

But if you press the emergency stop and need to return to the original, then you need to turn off the return to original completion signal FALSE, so we need to define a "return to original completion signal" variable by ourselves.

 

2. Pause and stop processing flow

① We can directly bind the pause and stop buttons to the pins of the MC_Halt command

②Call the MC_Halt pin to stop the axis, but remember to turn off the MC_Halt command

3. About the interpretation and execution of the program

Press stop to trigger the MC_Halt command, and the program goes to step 100. At this time, turn off the trigger pin of the Halt command, and then trigger it back to the original. The duration of this series of operations is within 10ms, but the axis has not stopped completely at this time, that is to say, the Halt command is still being executed and the return to the original position is triggered. Then there will be a problem that the actual position will move forward by a few tenths of a millimeter after returning to the original position.

Solution: Use the MC_Halt.Done signal to ensure that the trigger returns to the original state after the pause is complete.

4. Start-up program processing by sub-station operation 

Normally speaking, the operation is divided into stations, and each device can be written in different subroutines to run separately, but the following writing will cause the imaginary axis to move, but the real axis will not move.

 

The reason for the above situation is that the program is also executed sequentially within a scan cycle. When it is refreshed to the 0th step of the virtual axis, the program starts to set TRUE, but the program immediately drops FALSE, causing the program to refresh to the 0th step of the real axis. When stepping, there is no start signal, so only the imaginary axis moves, and the real axis does not move. (In other words, whoever called it before will execute it) 

The solution is not to reset the button, but to use the step sequence to remove the card program!

Guess you like

Origin blog.csdn.net/viixin/article/details/130747745
Recommended