How to make a program using counter

mustaqim90

Member
Join Date
Mar 2015
Location
SHAH ALAM
Posts
13
HI i newbies.

i want make a simple program in cx- programming.. i have 4 sensor(detect the box). how to count the boxes that have presents..if all the boxes comes at the same time how can i count it?..

there a simple program or function block?

Untitled.jpg
 
If you're saying all 4 boxes come together with no space between they may be sensed as one (long) box, if that's the case I would have a conveyor section going a little faster to pull the box to be counted away from the next box, & count the box when you're sure it's separated.
 
It is a bit difficult to read your JPG files, but I suspect you are monitoring in decimal instead of hex/BCD.
Check the symbol in front of the number, & is decimal, # is hex/BCD. 12 BCD = 18 decimal.
 
Why do I get the value 18??.. It should be 12, right?
Yes. It appears that you are reading some boxes more than 1 time. Try this: use all 4 sensors to create a "Read" Bit (Sensor 1 and Sensor 2 and Sensor 3 and Sensor 4 = Read Bit). This Read Bit goes on only when all 4 sensors see a box at the same time. Then use Sensor 1 and Read Bit = Counter 1; and Sensor 2 and Read Bit = Counter 2, and so on for all 4 Counters. That should prevent reading a box more than 1 time.

The problem may come up IF there are ever less than 4 boxes in each hanger. Then you would have to come up with some additional logic.
 

Similar Topics

For my first time, I put a copy of Studio 5000 and Factory Talk Activation Manager on my customer's machine (On-logic Windows PC), then use remote...
Replies
3
Views
2,474
Hi, i need to make: 1- A PLC Program on Omron PLC CP2E-N using high speed counter E6C3-AG5B 360P/R 2M(Absolute) ,to Reject bottles on Conveyor...
Replies
4
Views
862
We have a third-party rs232 cable, can we connect it to the Rockwell PLC-5/30 and upload the program ? The controller is an Allen Bradley 1785-L30B .
Replies
8
Views
3,986
Hey everyone. I am trying to create some logic that will turn on an output only during production times. M-F 5am to 3:30pm. The output is for...
Replies
3
Views
1,357
Hello everyone and thank you for your assistance before hand. I have a request from a customer that wants to run a conveyor for only 15 to 30...
Replies
13
Views
2,089
Back
Top Bottom