wildswing
Member
Referring to Okie's last suggestion, I can only provide examples of how I do things. This app is my only experience with camming in my little world.
My camming (slave motion) is done in one task. There's a completely separate task that watches and manipulates the master axis value. This could probably be combined into one where first we watch the master then we move and cycle back to the beginning.
Anyhow, without getting into too much detail (there's lots more in my gml diagram), I set a watch on the actual position of the master (encoder). The trip point of the watch is the cut length (sent via RIO to user variable in GML). When the watch trips, I start the slave motion and redefine the master position to zero. The encoder watch task recycles to the beginning where we re-arm the watch while the cut motion is in progress.
If you only have one cutting implement, then you can do what I said above regardless of the distance between the encoder and the actual point where the blade enters the material or begins it's motion. Any offset this creates in the actual cut length is repeated on every cut. If every piece is cut with the same offset, the net effect is zero. I think they call this a "crop cut".
I have two saws that can alternate cuts so I have to add an extra step in my encoder watch task. No need to complicate the discussion with that yet.
My camming (slave motion) is done in one task. There's a completely separate task that watches and manipulates the master axis value. This could probably be combined into one where first we watch the master then we move and cycle back to the beginning.
Anyhow, without getting into too much detail (there's lots more in my gml diagram), I set a watch on the actual position of the master (encoder). The trip point of the watch is the cut length (sent via RIO to user variable in GML). When the watch trips, I start the slave motion and redefine the master position to zero. The encoder watch task recycles to the beginning where we re-arm the watch while the cut motion is in progress.
If you only have one cutting implement, then you can do what I said above regardless of the distance between the encoder and the actual point where the blade enters the material or begins it's motion. Any offset this creates in the actual cut length is repeated on every cut. If every piece is cut with the same offset, the net effect is zero. I think they call this a "crop cut".
I have two saws that can alternate cuts so I have to add an extra step in my encoder watch task. No need to complicate the discussion with that yet.