Good evening to everyone, here is my question..
I have typed a software in ladder using a plc dl05 and interfacing it with a Cmore micro lcd panel. This software is aimed to control a milling machine.I have made a linear axis control using a linear encoder and configuring the plc into the HSIO mode 40 for quadrature input as showed in the plc manual.There is also an operator interface with the Cmore micro where the operator can set the value of the displacement of the axis wanted and also can choose the direction of the movement.
In my program when the operator has chose a value on the lcd panel and has chose the direction (left or right), by pressing the Go button on the panel, the motor is switched on and the axis of the miller starts moving and there is the part of the software which makes the control for the position.
In the software, that i attach here, you can see i used the counter CT76 as in the manual of the PLC explained for MODE 40 of the HSIO.
The wiring and the software seems to work well except for a little problem : lets say the operator inserted a value and press go, then the motor will run and the counter will increment till it reaches the wanted value, then the reset option will reset the value of the counter to zero. But if lets say i try to insert a new value for the displacement and i again press Go the counting won't start to 0 but from a non zero value.
I don't manage to understand, i think there should be another set for the reset variable of the counter into the program. Can someone help?
I know my request my be hard but i have been debugging this software for ten days already and i don't manage to come up with a solution
i attach here both software and monitor interface with cmore micro
I have typed a software in ladder using a plc dl05 and interfacing it with a Cmore micro lcd panel. This software is aimed to control a milling machine.I have made a linear axis control using a linear encoder and configuring the plc into the HSIO mode 40 for quadrature input as showed in the plc manual.There is also an operator interface with the Cmore micro where the operator can set the value of the displacement of the axis wanted and also can choose the direction of the movement.
In my program when the operator has chose a value on the lcd panel and has chose the direction (left or right), by pressing the Go button on the panel, the motor is switched on and the axis of the miller starts moving and there is the part of the software which makes the control for the position.
In the software, that i attach here, you can see i used the counter CT76 as in the manual of the PLC explained for MODE 40 of the HSIO.
The wiring and the software seems to work well except for a little problem : lets say the operator inserted a value and press go, then the motor will run and the counter will increment till it reaches the wanted value, then the reset option will reset the value of the counter to zero. But if lets say i try to insert a new value for the displacement and i again press Go the counting won't start to 0 but from a non zero value.
I don't manage to understand, i think there should be another set for the reset variable of the counter into the program. Can someone help?
I know my request my be hard but i have been debugging this software for ten days already and i don't manage to come up with a solution
i attach here both software and monitor interface with cmore micro