Jump to content

Recommended Posts

Posted (edited)
Hi all. I am currently working on a PLC program that is supposed to do the following: - A sensor is looking inside a rail where it is supposed to count the parts moving by the sensor. - If there is too few parts moving past the sensor within a given time period a light bulb will activate, indicating that the flow of parts is too low. So.. If x amount of parts has NOT moved past the sensor in x amount of seconds, the light will go on.The light should only be able to activate when a signal "feeder start" is active.The light should go off when x amount of parts HAS moved past the sensor in x amount of seconds.I have posted a screenshot of what i have currently made in CX-programmer. This is my current work and frankly it doesnt really work that well. I have tried making this for hours and I would really appreciate some help on how to achieve this. Im rather new to PLC programming. Hope you can help :) BR Henrik Additional info: The PLC is a CPM1A-20CDT1-D-V1 Using CX-Programmer v5.0 Edited by henrikkp28
Posted
what do you want to happen when the lamp comes on.. ie stop the machine ? or just indicate.. how do you want to reset the lamp, product flow good / or reset pb. your logic will auto reset the lamp as soon as the cnt is complete cause you use the cnt000 bit to reset the cnt000.
Posted
i see the problem description but if you ask me, i would look at this a bit differently... problem talks about frequency but you can easily measure period. fortunately frequency and period are directly related: f=1/T if you have time interval and count, you can determine average interval for ONE part by simply dividing the two. for example if interval is 10sec and you expect 5 parts, then 10/5=2sec so we need the part every 2 seconds. i would measure duration between rising edges of sensor signal. if the time is less than 2sec we are fine, if it is more than 2sec then we are too slow... nice thing about this is that you get meaningful measurement for every single part so you can respond right away if you like (or you can do filtering or averaging if you prefer).
Posted
@panic mode Really interesting idea with the frequency, however the flow is generally rather uneven so im not quite sure it would work that well. We could have we could have 2 parts within the first 7 seconds, and then 3 parts within the last 3 seconds. In this case the lamp would go on for the first period of 7 seconds? @Sleepy Wombat When the light goes on I only want the lamp to give a warning. When the flow is good, and ONLY when then the flow is good, the light should turn off. You are completely right about the counter that resets the lamp when i dont want it to, i tried to fix this. currently the program is like this: INFO: When the flow is bad (Counter does not reset before timer reaches 0) the second counter goes into work. The second counter will turn off the lamp when 5 parts has passed the sensor. I now need to build in a timer with the second counter, so instead of just turning off after 5 parts has passed the sensor. I want to turn of the lamp when 5 parts has passed the sensor BEFORE a timer of 10seconds has expired. Any ideas?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...