Brand new BX-DM1E with 2 HSIO2 cards.
v2.11.2 software and firmware.
I am using a conditioned RUN command in $Main to start a stage program.
If the stage program is running and I switch to program mode and back to run, the stage program will not execute until the rung is enabled in $Main. This is the expected behavior.
If I cycle power while the stage program is running, it comes back on with the stage program still executing at the stage it was in when it lost power. This means in my case that it skips Stage S0 where my AXCONFIG resides and both it and the AXVEL in Stage S1 shows execution mode as not-configured (Mode 0). The help files say it is "unconfigured".
Oddly, if I have a contact in the AXVEL rung that is false and then goes true after the PLC is running, it will switch mode straight to smart-velocity.
This starting with the stage program running and already in S1 is undesirable. I thought it might be that I had set the stage program to retentive. But unticking the box didn't change the results and yes it was a program mode change to install.
How do I prevent this?
Second question - This is being used at the moment to simulate a lead encoder going out of HSIO2 Axis1, jumped into HSIO2 CT2. I am trying to simulate the retentive accumulator that will be going into HSIO2 CT1. CT1 is lead, CT2 is follow.
I need to maintain the Current Position from Axis1 through a power loss/restore and get it back into Axis1. While this part goes away after testing, it is not cooperating.
Currently I have:
STR C100 AXVEL "blah blah blah"
AND $HSIO_001_Axis1.Active
MOVE $HSIO_001_Axis1.CurrentPosition D100
It does work, but does grab the D100 value before the CurrentPosition end value every time.
I tried saving values in $tLastScan, but it never reads the real CurrentPosition on power loss, so it's always zero.
Is there a better way?