Help - Search - Members - Calendar
Full Version: Design Logic
Forums.MrPLC.com > PLCs and Supporting Devices > Mitsubishi
Muhammad Daniyal
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
kaare_t
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.....
Crossbow
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.
panic mode
what is the plc model?
Muhammad Daniyal
QUOTE (panic mode @ Sep 20 2009, 01:16 PM) *
what is the plc model?


FX-2N

If posible please attached the logic for this issue.

Veganic
What is the maximum flow rate or pulses per second?
kaare_t
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.
Muhammad Daniyal
QUOTE (kaare_t @ Sep 20 2009, 08:11 PM) *
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.


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.

kaare_t
What kind of ladder? GX Developer? GX IEC Developer?
Muhammad Daniyal
QUOTE (kaare_t @ Sep 24 2009, 10:46 AM) *
What kind of ladder? GX Developer? GX IEC Developer?


GX Developer
Inntele
QUOTE (Muhammad Daniyal @ Sep 24 2009, 11:40 AM) *
QUOTE (kaare_t @ Sep 20 2009, 08:11 PM) *
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.


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.


As an example for your case (100 pulses per liter).Click to view attachment

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.
Mitsu
QUOTE (kaare_t @ Sep 19 2009, 09:50 AM) *
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.....


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).
Muhammad Daniyal
QUOTE (Inntele @ Sep 24 2009, 03:02 PM) *
QUOTE (Muhammad Daniyal @ Sep 24 2009, 11:40 AM) *
QUOTE (kaare_t @ Sep 20 2009, 08:11 PM) *
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.


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.


As an example for your case (100 pulses per liter).Click to view attachment

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.



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
Inntele
QUOTE (Muhammad Daniyal @ Sep 26 2009, 11:08 AM) *
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


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
Muhammad Daniyal
QUOTE (Inntele @ Sep 26 2009, 10:59 AM) *
QUOTE (Muhammad Daniyal @ Sep 26 2009, 11:08 AM) *
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


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



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.
Inntele
QUOTE (Muhammad Daniyal @ Sep 26 2009, 03:43 PM) *
QUOTE (Inntele @ Sep 26 2009, 10:59 AM) *

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



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.

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.
Muhammad Daniyal
QUOTE (Inntele @ Sep 26 2009, 03:25 PM) *
QUOTE (Muhammad Daniyal @ Sep 26 2009, 03:43 PM) *
QUOTE (Inntele @ Sep 26 2009, 10:59 AM) *

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



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.

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.



Ok i need your help to complete this project. kindly tell me which parameters you required for this.

Inntele
QUOTE (Muhammad Daniyal @ Sep 27 2009, 02:44 PM) *
QUOTE (Inntele @ Sep 26 2009, 03:25 PM) *

If you need help, I could do it.

Ok i need your help to complete this project. kindly tell me which parameters you required for this.


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.
Muhammad Daniyal
QUOTE (Inntele @ Sep 27 2009, 03:45 PM) *
QUOTE (Muhammad Daniyal @ Sep 27 2009, 02:44 PM) *
QUOTE (Inntele @ Sep 26 2009, 03:25 PM) *

If you need help, I could do it.

Ok i need your help to complete this project. kindly tell me which parameters you required for this.


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.


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
Inntele
QUOTE (Muhammad Daniyal @ Sep 27 2009, 06:58 PM) *
QUOTE (Inntele @ Sep 27 2009, 03:45 PM) *
QUOTE (Muhammad Daniyal @ Sep 27 2009, 02:44 PM) *
QUOTE (Inntele @ Sep 26 2009, 03:25 PM) *

If you need help, I could do it.

Ok i need your help to complete this project. kindly tell me which parameters you required for this.


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.


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


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.
Muhammad Daniyal
QUOTE (Inntele @ Sep 27 2009, 07:05 PM) *
QUOTE (Muhammad Daniyal @ Sep 27 2009, 06:58 PM) *
QUOTE (Inntele @ Sep 27 2009, 03:45 PM) *
QUOTE (Muhammad Daniyal @ Sep 27 2009, 02:44 PM) *
QUOTE (Inntele @ Sep 26 2009, 03:25 PM) *

If you need help, I could do it.

Ok i need your help to complete this project. kindly tell me which parameters you required for this.


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.


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


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.


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.


Goody
You have shown amazing tolerance and patience - my invoice would have been in the post already :)
Inntele
This file describes how to choose a counter and the measuring period, in particular for your case Click to view attachment

If you want to calculate a flowrate only, you could use this example of program Click to view attachment

If you want to calculate both a flowrate and a liquid consumption, you could use this example of program Click to view attachment

I think you will not be difficult to replace variables in the above examples onto unused in your program.

Kind regards.
Muhammad Daniyal
QUOTE (Inntele @ Sep 29 2009, 01:47 AM) *
This file describes how to choose a counter and the measuring period, in particular for your case Click to view attachment

If you want to calculate a flowrate only, you could use this example of program Click to view attachment

If you want to calculate both a flowrate and a liquid consumption, you could use this example of program Click to view attachment

I think you will not be difficult to replace variables in the above examples onto unused in your program.

Kind regards.


Thank you very much Inntele,
Good Luck
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.