Hello everyone!
I'm upgrading an old sanding machines control system.
Old system is based on 286 PC and I'm changing that to Siemens PLC and Touchscreen.
While making the program I came into something where I couldn't think of any smart idea. I was hoping someone here could help me with this.
Here ís some explanation about the system:
The machine is a wide belt sandingmachine for sanding wooden boards. The board goes through the machine in a conveyor and the sanding pads are in a distance of about 1m from the micros.
Sanding pad is divided into 32 pads. There are also 32 microswitches before the machine which tells the width of the board to be sanded with the pads.
Normally sanding is only done 1:1 to the microswitches. There is also possibility to add or decrease the pads on the edges.
Normal settings 1:1 to microswitches
0000_0011_1111_1111_1111_1111_0000_0000 (MICROSWITCHES)
0000_0011_1111_1111_1111_1111_0000_0000 (PADS USED FOR SANDING)
1 pad added to edges
0000_0011_1111_1111_1111_1111_0000_0000 (MICROSWITCHES)
0000_0111_1111_1111_1111_1111_1000_0000 (PADS USED FOR SANDING)
1 pad decreased from edges
0000_0011_1111_1111_1111_1111_0000_0000 (MICROSWITCHES)
0000_0001_1111_1111_1111_1110_0000_0000 (PADS USED FOR SANDING)
My basic idea is to read the microswitch inputs with every pulsencoder pulse and shift them forward as a double word in a shiftregister.
Then I read the shiftregister indirectly in the point where the board is in place for dropping down the sandingpads and also in the point when board ends and the pads must be lifted (These points must be adjustable)
For deciding which pads to use I have my problem.
Adding the pads to edges is easy by shifting the bits on the DW to left and right and adding them together.
0000_0011_1111_1111_1111_1111_0000_0000 (MICROSWITCHES)
0000_0111_1111_1111_1111_1110_0000_0000 shifted 1 left
0000_0001_1111_1111_1111_1111_1000_0000 shifted 1 right
0000_0111_1111_1111_1111_1111_1000_0000 ADDED TOGETHER
But for decreasing the pads in edges I haven't found a solution.
If the board was always at the middle I could do the shifting with half of the DW at a time and then add them together.
0000_0011_1111_1111_1111_1111_0000_0000 (MICROSWITCHES)
0000_0001_1111_1111 (SHR 1) 1111_1100_0000_0000 (SHL 1)
0000_0001_1111_1111_1111_111O_0000_0000 RESULT
But because the board can be at any place in the conveyor (Left or right or anywhere between) I can't think of any wise idea.
I would be more than happy if someone could help me with this!
I hope you will understand what I have written about the system and if there is any more info needed please ask.
Best Regards
TS
I'm upgrading an old sanding machines control system.
Old system is based on 286 PC and I'm changing that to Siemens PLC and Touchscreen.
While making the program I came into something where I couldn't think of any smart idea. I was hoping someone here could help me with this.
Here ís some explanation about the system:
The machine is a wide belt sandingmachine for sanding wooden boards. The board goes through the machine in a conveyor and the sanding pads are in a distance of about 1m from the micros.
Sanding pad is divided into 32 pads. There are also 32 microswitches before the machine which tells the width of the board to be sanded with the pads.
Normally sanding is only done 1:1 to the microswitches. There is also possibility to add or decrease the pads on the edges.
Normal settings 1:1 to microswitches
0000_0011_1111_1111_1111_1111_0000_0000 (MICROSWITCHES)
0000_0011_1111_1111_1111_1111_0000_0000 (PADS USED FOR SANDING)
1 pad added to edges
0000_0011_1111_1111_1111_1111_0000_0000 (MICROSWITCHES)
0000_0111_1111_1111_1111_1111_1000_0000 (PADS USED FOR SANDING)
1 pad decreased from edges
0000_0011_1111_1111_1111_1111_0000_0000 (MICROSWITCHES)
0000_0001_1111_1111_1111_1110_0000_0000 (PADS USED FOR SANDING)
My basic idea is to read the microswitch inputs with every pulsencoder pulse and shift them forward as a double word in a shiftregister.
Then I read the shiftregister indirectly in the point where the board is in place for dropping down the sandingpads and also in the point when board ends and the pads must be lifted (These points must be adjustable)
For deciding which pads to use I have my problem.
Adding the pads to edges is easy by shifting the bits on the DW to left and right and adding them together.
0000_0011_1111_1111_1111_1111_0000_0000 (MICROSWITCHES)
0000_0111_1111_1111_1111_1110_0000_0000 shifted 1 left
0000_0001_1111_1111_1111_1111_1000_0000 shifted 1 right
0000_0111_1111_1111_1111_1111_1000_0000 ADDED TOGETHER
But for decreasing the pads in edges I haven't found a solution.
If the board was always at the middle I could do the shifting with half of the DW at a time and then add them together.
0000_0011_1111_1111_1111_1111_0000_0000 (MICROSWITCHES)
0000_0001_1111_1111 (SHR 1) 1111_1100_0000_0000 (SHL 1)
0000_0001_1111_1111_1111_111O_0000_0000 RESULT
But because the board can be at any place in the conveyor (Left or right or anywhere between) I can't think of any wise idea.
I would be more than happy if someone could help me with this!
I hope you will understand what I have written about the system and if there is any more info needed please ask.
Best Regards
TS