Sign in to follow this  
Followers 0
nmlfreitas

flow meter and cp1l

12 posts in this topic

Hello i have been folowing this forum for sometime but just now i got the gut to register and ask for help.

i'm new to programming omrom, so i have a few questions.

i have a flow meter that is and npn or pnp and it has a resolution of 1930 pulses per litre.

my machine is an omrom cpl1 l10.

is it this machine capable to read this much pulses per litre? If so what fuction is the correct one to read this many pulses ?

 

Thank you

Share this post


Link to post
Share on other sites

The CP1L can read pulse signals up to 100kHz for single channel high speed inputs or 50 kHz for differential (2 channel) high speed inputs.  So, with your flow meter, the CP1L would be able to handle about 50 liters/s or 25 liters / s respectively (depending upon if this 1930 specification is for a single channel pulse or differential).  For details on the high speed counter functions of the CP1L, see section 5-1 of the CP1L Operations manual.  

You can find this manual here:

https://downloads.omron.eu/IAB/Products/Automation%20Systems/PLCs/Compact%20PLC%20Series/CP1L/W462/W462-E1-08+CP1L-CPU+OperManual.pdf

Share this post


Link to post
Share on other sites

Michael, thank you for the reference on the manual, it will help me a lot.I didn't have it.

The flow meter is a single channel.

I'm going to use this flow meter to measure litres of water (pre-defined value), so i was wondering if i can use the PRV function in order to know how many pulses i have, and then compare it with the pre-defined value.

I know that for each 1930 pulses i have 1 litre.

  Form your experience, using this function it's the right way?

 

Thanks in advance

Share this post


Link to post
Share on other sites

The PRV instruction can be used for many different operations, but it should not be necessary for your application.  The present value of the counter is automatically stored in the memory of the CP1L in DINT format in the addresses below:

Counter 0:  A270

Counter 1: A272

Counter 2: A316

Counter 3: A318

You can just use regular comparison instructions such as >=SL to check if the value in the addresses above is > or = to the setpoint.    If a quicker response is required that the PLC scan can provide, you can look to use the CTBL instruction which will allow you to run an interrupt routine when the counter reaches a specific value.  In many cases use of CTBL instruction is not required and using simple comparison instructions are sufficient.  The INI instruction can be used to reset the counter value to 0 in preparation to fill the next vessel.

Share this post


Link to post
Share on other sites

Hi there again Michael

Thank you for your quick answer.

thanks a lot for your help.

Now i understand where to go.

 

 

Share this post


Link to post
Share on other sites

I would recommend using the PRV2(883) instruction, far easier to use than messing around with PRV and CTBL.

Even though it states this instruction is for "Converting Frequency to Rotation Speed" it can be readily scaled for your application to give liters/sec, liters/min or liters/hour.

My 2 cents. 

1 person likes this

Share this post


Link to post
Share on other sites

He is not looking for a rate, but a volume.  He can just look in A270 (as an example for counter 0).  The only reason that I suggested that he might need CTBL was if he needed to run an interrupt based on a setpoint.

Share this post


Link to post
Share on other sites

No worries, we all do that at times.  I had one the other day where I was way off.

Share this post


Link to post
Share on other sites

Hello guys.

I have made a simple drawing of the connections i have for my flow meter.

the 1 on the image is the way to connect to the flow meter that is on the manual.

the 2 is my ideia, or at least how i think i would connect it to the cp1l-l10.

Is this the correct way to do it? The flow meter was a bit expensive and i think its better to ask someone that knows more then me before i make a mistake.

Thanks again....

connect.bmp

Share this post


Link to post
Share on other sites

I think that it should look more like this:

56bded01bb94e_Flowmeterwiringsuggestion.

Share this post


Link to post
Share on other sites

Hello

I have made some tests with my flow meter and i want to use the CTBL instruction just like Mike said in order to generate an interrupt.

Here is the trouble! I have set the CTBL instruction and wrote the D table with the values i wanted. I hope i'm not mistaken.

My setpoint is set on the D table right?

I have made some code but i would like someone to explain me how can i set an interrupt on the code so i can activate a coil....

 

Thanks

 

ex1.cxp

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0