I indeed forgot to describe.
Yes, both forward and reverse motion is required for motor. Basically motor is connected to slider, at power up, slider moves to home position (determined by limit switch) and then goes to end limit switch (this way PLC could calculate total length of slider track and/or if it has been changed). Then part is pushed in front of slider and slider steadily starts to move towards home switch, when home switch registers touch, this meant that slider is touching the end of the part and home is touching the start of the part. This way PLC could calculate part length and starts work operation.
Most important is to get encoder values right, because PLC is going to calculate part length according to encoder value. So speed control is not that important.
Could I possibly order some extension modules for t20 to add analog outputs for +/- 10V? They do not exchange PLCs here, so only cheap way is to buy some kind of extension modules.
My thought was that I will use IO-AI4-AO2 extension module and for encoder I will use fast optocoupler (50-100kHz) to ramp 5v to 24v.
To add Eth port to Samba I would use V10017ET2 module and then EXA2X to create module port for IO-AI4-AO2.
Is this legit way to do this or is there anything I could do to make things easier?
This way I am approximately saving ~150 bucks, compared to buy samba t22 (and maybe still have to buy additional modules)?
Motor drive full code: Bautz DSK 12
Samba full code: SM43-J-T20
Steven