Simple way to "wait " 2-4 CPU scans

I am using many AMCs. Most commands to the AMC need 2-4 scans to prosses before another scan is sent or AMC in-progress, complete, move status are updated. Anyone have a clever way to wait 2,3,4 scans? P2000

 

Thanks Brad


  • kewakl (Customer)

    You could check the scan counter tags.

     

    Every Other Scan Bit

    Total Scan Count1

    Total Scan Count2

     

    I do not have a routine to do as you want.

  • Broncosaurs (Customer)

    I did a simple program to delay the 4 scans, take current scan countsand add 4, then use a compare contact w/ current scan counts and scan count + 4 to continue. Worked great using the simulator but when I put it into the p2-250 this did not work. When way beyond the +4 counts before the compare went true. I added a few copys and an array to try and catch what was going on. Brought the two Total scan counts into one. The simulator this all work perfect, the p2 not so much. Why is the PLC version not running as expected? Why is the array not catching each scan number? Why is the Compare not stopping at the correct time? Can someone help me out with this.

     

    BTW I was abbreviating counts as c*ts w/ * = n , got in trouble for using a bad word!

     

    image 

    Expand Post