Sign in to follow this  
Followers 0
Muhammad Daniyal

Design Logic

24 posts in this topic

Good Day, Dear friends, My Problem related with the turbine Flowmeter who has the pulses output with respect to flow of fluid. E.g 10PULSES represents the 1 litter/min. the flowmeter does not have any converter that convertes the Pulses to standard Analog signal. So i want to convert the Flowmeter pulses in Analog format or any scalabel form by designing in the Ladder Logic. if anybody have the idea of femiliar with this scenerio kindly guide my or help me through your experience, therefore i could complete this task. it is requested for the quick responce by you people. Thanks & Regard. Daniyal

Share this post


Link to post
Share on other sites
Hello. Do you use GX Developer or GX IEC Developer? In GX IEC Developer you have an instruction which is called "SPD". This instruction use one of the physical inputs (X), counts z number of pulses and automaticly scales the output so this is basically what you need.....

Share this post


Link to post
Share on other sites
I've done an application like this with a liquid flow meter. It had a pulse output. We use a high speed counter on the PLC. What to do is count all the pulses in a particular period of time, like 1 second. Do this by storing a reading of the counter, wait one second, take another reading, and subtract the first from the last. Then replace the old reading with the new one, and repeat again in one second. So as an example, I was working on 10 pulses per gallon. If I read 60 pulses in a second, that meant 6 gallons per second. Multiple by 60 seconds in a minute, and there you have 360 gallons per minute.

Share this post


Link to post
Share on other sites
what is the plc model?

Share this post


Link to post
Share on other sites
FX-2N If posible please attached the logic for this issue.

Share this post


Link to post
Share on other sites
What is the maximum flow rate or pulses per second?

Share this post


Link to post
Share on other sites
This would all be a bit easier if you provided more information.... What is your programming language? Flowrate/pulses Resolution needed PLC Type (see you provided that now) Give us some info and it's easier for us to help you.

Share this post


Link to post
Share on other sites
Sorry for late reply, The Programming Language is Ladder type that i am using to design the program. Flowrate is about 1litter/100pulses. 12Bit resolution i need. PLC is FX-2N.

Share this post


Link to post
Share on other sites
What kind of ladder? GX Developer? GX IEC Developer?

Share this post


Link to post
Share on other sites
As an example for your case (100 pulses per liter).GX_Developer_print_Flowrate.pdf The program calculates simultaneously a liquid consumption and an average flowrate per minute. Average flowrate calculates with 6 second delay. The program warns in advance about overflow of the consumption counter.

Share this post


Link to post
Share on other sites
Had a look at this instruction and it doesn't depend on using GX dev or IEC. In other words, it can be used in GX dev. The use of it is probably determined by the type of CPU (Q/A/FX).

Share this post


Link to post
Share on other sites
Thanks you very much, but there is a problem with your design logic, the program updates the flowrate figure after 1 min when timer reaches the setvalue. While our need is that flowrate must be continuously update its figure by the short interval of the may be less than 1-sec. with this condition we are unable to get the actual flowrate figure during 1min when the timer is running. try to resolve the logic that calculate the flowrate when the flow of liquid increase or decreas. thanks and regards

Share this post


Link to post
Share on other sites
Dear Muhammad, 1) About updates value of flowrate . You did mistake. I wrote, the flowrate is calculated every 6-sec (the timer is with 0,1s resolution). 2) You asked us to give you a sample of program (an idea) and not an operating program. If you want to get the operating program you should inform us about: - maximum and minimum flowrate per minute; - maximum scan time of your current program; - address of input to which your flowmeter is connected. Because the real program code will depends on value of these parameters. And this information is "starting" only. Regards Edited by Inntele

Share this post


Link to post
Share on other sites
Its great regards, i want to just make sure the unit that you have been mentioned with comments (D2 = Liquid Flowrate (L/min) in the program. otherwise its an idea that can be modified according to my requirement. Thank you for your great Help and the giving the idea.

Share this post


Link to post
Share on other sites
Hi, Several comments... In my sample the flowrate, which calculated in D2,is measured in deciliters per minute. You can scale it with possibilities of HMI or SCADA. The test of programs usually is begun from test of PLC program only (separately from HMI or SCADA program). The way of calculation of flowrate seriously depends on a pulse quantity per scan. According to this parameter is need to choose: - type of counter (general or high-speed) - calculation period. If it is necessary to use high-speed counters (or interrupt routine) appear some restrictions on the address of input, the programming code will another absolutely. The correct choice of flowmeter's resolution (according to accuracy, which is real necessary) is most important task to get a good programming decision. If you need help, I could do it. Good luck. Edited by Inntele

Share this post


Link to post
Share on other sites
Ok i need your help to complete this project. kindly tell me which parameters you required for this.

Share this post


Link to post
Share on other sites
You should inform about: 1) the address of input to which your flowmeter is connected now; 2) a maximum and minimum flowrate per minute; 3) a maximum scan time of your current program; 4) an unused addresses of device (D, C, M) in your PLC; 5) the parameters of the interface to HMI/SCADA (type, baudrate...). Then I'll send you my recommendations and the program's piece, which you could insert directly into your program. Edited by Inntele

Share this post


Link to post
Share on other sites
1) X0 2) 0 to 100gallon/h (1Litter/min = 200Pulses) 3) 20mSec including the communication. 4) unused Devices from D5000, M2000, C10 5) Modbus 485, 9600bps, 1-Parity, Even, 1-Stop please dont hasitate for further information

Share this post


Link to post
Share on other sites
I would like to specify: 1) Any flowmeter, which has the discrete output, is characterized with parameter of a pulses quantity per litter (an example, 100 pulses/litter or 200 pulses/litter). In one of the former post you wrote that the flowmeter has 100 pulses per litter, now you write 1Litter/min = 200Pulses. Please specify, how much is exact value of this parameter (pulses per litter)? 2) When I asked about maximum and minimum flowrate, I interested of values in case if the flow is present. I see, the maximum flowrate is 100gallon/h. If the flow is absent, the flowrate is 0. What is exact value of minimum flowrate, if flow is present? That's all necessary information.

Share this post


Link to post
Share on other sites
Dear, In my earliest posts i just need an idea that how to make this application applicable in PLC logic, so thats why i wrote the spose figure for making reference. while now the information i gave you are as per my actual figurs and these figures are according to my flowmeter specifications (100Pulses/Litter), because we are now just insert the designed piece of logic in my program as you have mentioned. the minimum flowrate should be 4gallon/h.

Share this post


Link to post
Share on other sites
You have shown amazing tolerance and patience - my invoice would have been in the post already :)

Share this post


Link to post
Share on other sites
This file describes how to choose a counter and the measuring period, in particular for your case How_to_choose_a_counter_and_the_period_of_parameter_measurement.pdf If you want to calculate a flowrate only, you could use this example of program GX_Developer_print_Flowrate_1.pdf If you want to calculate both a flowrate and a liquid consumption, you could use this example of program GX_Developer_print_Flowrate_2.pdf I think you will not be difficult to replace variables in the above examples onto unused in your program. Kind regards. Edited by Inntele

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