Thank you, Mahesh. There is usually a web post for each of the videos. Here is the post for this video: accautomation.ca/click-plc-timers-and-counters/ Here is the entire series for the Click PLC. accautomation.ca/series/click-plc/ This will give you additional insight into what this PLC can do. Thanks again, Garry
Hi Dronai, The system control bits (SC) can be very useful in your program. Here is a list of some of the other bits. These can be found in the help file. Seach for System Control Relays. SC1 _Always_ON Always ON. SC2 _1st_SCAN ON for the First Scan only. SC3 _SCAN_Clock Changes from OFF to ON or ON to OFF every Scan. SC4 _10ms_Clock Changes from OFF to ON and ON to OFF every 5ms. SC5 _100ms_Clock Changes from OFF to ON and ON to OFF every 50ms. SC6 _500ms_Clock Changes from OFF to ON and ON to OFF every 250ms. SC7 _1sec_Clock Changes from OFF to ON and ON to OFF every 500ms. SC8 _1min_Clock Changes from OFF to ON and ON to OFF every 30 seconds. SC9 _1hour_Clock Changes from OFF to ON and ON to OFF every 30 minutes. SC10 _Mode_Switch ON when PLC Mode Switch is in RUN position. SC11 _PLC_Mode ON when the PLC is in RUN mode. SC19 _PLC_Error ON when an Error occurs. SC20 _I/O_BUS_Error ON when an Error occurs. SC21 _System_Config_Error ON when an Error occurs. SC22 _I/O_Module_Error ON when an Error occurs. SC23 _Flash_Memory Error ON when an Error occurs. SC24 _Project_File_Error ON when an Error occurs. SC25 _Project_File_Ver_Error ON when an Error occurs. SC26 _Watchdog_Timer_ Error ON when an Error occurs. SC27 _Backup_Memory_Error ON when an Error occurs. SC28 _Battery_Low_Voltage ON when the Battery Voltage is Low (
Hi @phillipmaser132, Counters are memory retentive by default. To make the present value non-memory retentive, use the first scan bit SC2 on the counter's reset. Use a memory-retentive or fixed preset for the counter. If you are unsure, call the address picker. If the address is not memory-retentive, you can select memory retention, or vice versa. I hope this helps you out. Regards, Garry
What happens when the X001 input goes off and possibly back on later? Is the counter 'retentive' , ie. does it retain its accumulated count? Also, what happens if the X001 input is on for a long time - will the accumulated counter value overflow possibly going back through 0, or setting a system error that could cause issues? I have the same questions for the timer example but that could be addressed there. Thanks
Hi Steve, The count input of the counter works on the positive edge trigger. This means that the counter input can stay on or off and not increment the counter. The counter is memory retentive. If power is lost to the PLC or the PLC is placed in program mode, the counter will not reset. To make the counter non-memory retentive we can add a first scan bit to the reset of the counter. If the counter is not reset and continues to count, it will count up to 2 147 483 647 and hold the value. This is the largest integer that 32 bits will represent. No error will happen. Thanks for the question Steve.
Not 100% true. As loon as you hold your input X001 ON the counter will increment. For a problem like this you need to create "One Scan Shot". In order to have X001 work again you have to release it. This will prevent from incidentally holding your X001 longer than one count.
Yes you can. You would use the timers and counters along with some math functions. This would be stored in the memory area of the PLC.Here is a post on the math function:accautomation.ca/click-plc-compare-and-math-instructions/Let me know if you want more specific information. Regards,Garry
Garry Shortt is there someone I can pay to write a simple program? We have 2 shifts and all we want to do is display the count and the hourly average. Also have it reset the numbers at the end of shifts.
Hi Carl, If you can send me a separate email with the equipment that you have and what display you are using. Please also include the inputs going into the PLC. gclshortt@gmail.com Thanks Carl, Garry
Better mic has improved the audio for more recent videos. I still believe it is worth leaving this video active and not removing it. Thanks for the comment. Garry
Great - perfectly answered my question. Thank you.
Thanks for the comment Andrew.
Garry
Thanks very much. The way you explain things is the best that I have found so far.
Thank you, Mahesh.
There is usually a web post for each of the videos. Here is the post for this video:
accautomation.ca/click-plc-timers-and-counters/
Here is the entire series for the Click PLC.
accautomation.ca/series/click-plc/
This will give you additional insight into what this PLC can do.
Thanks again,
Garry
@@ACCautomation Thanks Gary I will have a look at it.
The SC7 second contact is a good feature to have instead of having to use a timer. My AB trainer software for the Micrologix 1000 doesn't have this.
Hi Dronai,
The system control bits (SC) can be very useful in your program. Here is a list of some of the other bits. These can be found in the help file. Seach for System Control Relays.
SC1
_Always_ON
Always ON.
SC2
_1st_SCAN
ON for the First Scan only.
SC3
_SCAN_Clock
Changes from OFF to ON or ON to OFF every Scan.
SC4
_10ms_Clock
Changes from OFF to ON and ON to OFF every 5ms.
SC5
_100ms_Clock
Changes from OFF to ON and ON to OFF every 50ms.
SC6
_500ms_Clock
Changes from OFF to ON and ON to OFF every 250ms.
SC7
_1sec_Clock
Changes from OFF to ON and ON to OFF every 500ms.
SC8
_1min_Clock
Changes from OFF to ON and ON to OFF every 30 seconds.
SC9
_1hour_Clock
Changes from OFF to ON and ON to OFF every 30 minutes.
SC10
_Mode_Switch
ON when PLC Mode Switch is in RUN position.
SC11
_PLC_Mode
ON when the PLC is in RUN mode.
SC19
_PLC_Error
ON when an Error occurs.
SC20
_I/O_BUS_Error
ON when an Error occurs.
SC21
_System_Config_Error
ON when an Error occurs.
SC22
_I/O_Module_Error
ON when an Error occurs.
SC23
_Flash_Memory Error
ON when an Error occurs.
SC24
_Project_File_Error
ON when an Error occurs.
SC25
_Project_File_Ver_Error
ON when an Error occurs.
SC26
_Watchdog_Timer_ Error
ON when an Error occurs.
SC27
_Backup_Memory_Error
ON when an Error occurs.
SC28
_Battery_Low_Voltage
ON when the Battery Voltage is Low (
Can we save the Count Value after power off and power on again. Retentive value has been restored to last value counted too.
Hi @phillipmaser132,
Counters are memory retentive by default. To make the present value non-memory retentive, use the first scan bit SC2 on the counter's reset.
Use a memory-retentive or fixed preset for the counter. If you are unsure, call the address picker. If the address is not memory-retentive, you can select memory retention, or vice versa.
I hope this helps you out.
Regards,
Garry
What happens when the X001 input goes off and possibly back on later?
Is the counter 'retentive' , ie. does it retain its accumulated count?
Also, what happens if the X001 input is on for a long time - will the accumulated counter value overflow possibly going back through 0, or setting a system error that could cause issues?
I have the same questions for the timer example but that could be addressed there.
Thanks
Hi Steve,
The count input of the counter works on the positive edge trigger. This means that the counter input can stay on or off and not increment the counter.
The counter is memory retentive. If power is lost to the PLC or the PLC is placed in program mode, the counter will not reset.
To make the counter non-memory retentive we can add a first scan bit to the reset of the counter.
If the counter is not reset and continues to count, it will count up to 2 147 483 647 and hold the value. This is the largest integer that 32 bits will represent. No error will happen.
Thanks for the question Steve.
Not 100% true. As loon as you hold your input X001 ON the counter will increment. For a problem like this you need to create "One Scan Shot". In order to have X001 work again you have to release it. This will prevent from incidentally holding your X001 longer than one count.
Is there a way to program this to display a count and a hourly average of product? Using 1 display going back and forth every few seconds?
Yes you can. You would use the timers and counters along with some math functions. This would be stored in the memory area of the PLC.Here is a post on the math function:accautomation.ca/click-plc-compare-and-math-instructions/Let me know if you want more specific information. Regards,Garry
Garry Shortt is there someone I can pay to write a simple program? We have 2 shifts and all we want to do is display the count and the hourly average. Also have it reset the numbers at the end of shifts.
Hi Carl,
If you can send me a separate email with the equipment that you have and what display you are using.
Please also include the inputs going into the PLC.
gclshortt@gmail.com
Thanks Carl,
Garry
The cotton mouth clicking sound is hugely distracting
Better mic has improved the audio for more recent videos.
I still believe it is worth leaving this video active and not removing it.
Thanks for the comment.
Garry