Ahermida (Customer) asked a question.

I'm using a CLICK PLC and for some reason I can't get _1st_SCAN to work. It never gets triggered. I've tried using from within the CLICK software, also turning the PLC off and then on....nothing. Any ideas?

  • Bolt (Customer)

    How do you know it's not working? It's literally only on for the first scan, which takes less than a millisecond on an otherwise empty PLC, ​so you can't notice visibly. As a test you can use the first scan bit to trigger a math instruction that adds 1 to DS1 and if that increments by one when you toggle the Click from Stop to Run, it did what it needed to do.

  • Garry (Customer)

    Another application is to reset / set values.

    Try this code...

    Click First ScanThis will move the value of 1234 into register DS1 on the first scan. Change the value of DS1 using Data View and switch from program back to run. The value should then change back to 1234.

    Regards,

    Garry

     

    https://accautomation.ca/series/click-plc/

     

    Expand Post
  • kewakl (Customer)

    >It never gets triggered.

    >How do you know it's not working?

    The communications between the PLC and the CLICK software on the PC is most likely LONGER than the duration of the first scan -- if the PC software were sync'ed with first scan, you might have a half-a-chance to see it in the ON state. The best we can do is use some 'tools' to trap that it happened.

    You now have two of these tools.

    On some 'more advanced' or 'higher-level' PLCs you could use trending/histogram tools to monitor fast transients

     

    @Bolt (Customer)​  has described a perfectly fine method to test your first scan bit.

    Here is another.

     

    It uses a off delay timer rung to indicate that at some point after going to RUN mode, SC2 was on long enough to reset the timer.

    This program has about 32Kscans in about 3.5 - 4 seconds

    There is a rudimentary scantime (using CLOCK SECONDS) logger at the bottom of the program.

    This logger will NOT be 100% accurate because I use SCANCOUNT < 5 as the trigger. I am losing some accuracy to be sure that I can track the scancount rollover.

    Expand Post
  • Ahermida (Customer)

    I found out that I was never stopping the PLC so it would never trigger. Thanks to everyone for the help!