You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old January 11th, 2022, 03:52 PM   #1
sengle
Member
New Zealand

sengle is offline
 
Join Date: Jan 2022
Location: Auckland
Posts: 13
PLC Recommendations for Horizontal Fuel Tank Doser Project

Greetings from all the way down here in New Zealand:-)
I have a challenge for you all.....

I have a need for a PLC to run a Doser pump to pump Additive into a Diesel tank.

The tricky bit is that the Main tank/cylinder is horizontal, so the maths isnt nice and straightforward like if it was a vertical tank.

The other tricky part is that tank filling happens at random times by a third party, and is a random quantity. Unfortunately there is no key lock, or hatch cover, or button press or any other easy digital triggers to alert the PLC that the tank is being filled.

We have an Analog pressure/level sensor which needs to understand/realise when the tank is topped up with diesel and that will trigger the Doser Pump routine.

We need to send alerts/updates via SMS/Txt.

So, I was looking at the Siemens Logo with CMR2020 cellular modem.
The modem integrates nicely with the Logo and it will let me send and receive txts/status etc.
Unfortunately I dont think the Logo will be able to do the complicated maths though.
PlanB is to use a calibration Table for the tank contents (more accurate), however the Logo cant handle tables, so was thinking of Move/Compare type blocks, but again I think the Logo would be limited by its available Block memory?

PlanC is to look at a S7-1200 which can do the complicated maths (Calculate). It doesnt do Tables though, so was thinking of Move/Compare type blocks as the S7-1200 has the block memory capacity?
It looks like the CP1242-7 modem works with it and will do what I require.

PlanD(!) - Looked at Eaton Easy4 - as it does Tables, but doesnt do complicated maths. The Easy4s cant receive SMS/txts, only MODBUS TCP.

There are a few other requirements ie. need 2 Analog inputs, 1 High speed digital input (200Hz) for Flowmeter, 2 Digital inputs for buttons, and 1 Digital out for Doser pump.

So, Long story short, I am looking for Hardware suggestions/recommendations please.

Many thanks.

Cheers,
Steve
  Reply With Quote
Old January 11th, 2022, 04:01 PM   #2
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 7,007
If the PLC does not have trig functions but does have floating point math, they are, in principle, straightforward to approximate (cf. https://ntrs.nasa.gov/api/citations/...9700026648.pdf), six digits of accuracy is only two terms, but the kabuki dance needed to get to those two terms is even longer, so the only question is whether the logo PLC can provide entough instructions.
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (but no longer ∞ ).
vi) Hakuna matata.
vii) Bookkeeping.
  Reply With Quote
Old January 11th, 2022, 04:06 PM   #3
mylespetro
Supporting Member
Canada

mylespetro is offline
 
mylespetro's Avatar
 
Join Date: Dec 2015
Location: NS
Posts: 719
Quote:
Originally Posted by drbitboy View Post
straightforward to approximate (cf. https://ntrs.nasa.gov/api/citations/...9700026648.pdf),
Off topic, but I love when you or Peter say something is simple (which it probably realistically is) and then link to a PDF that literally looks like rocket science, which in this case may be true, as it's a NASA technote
  Reply With Quote
Old January 11th, 2022, 04:38 PM   #4
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 7,007
Well, to be fair, I did not write "simple, but "straightforward," as in "Your destination is straight ahead, a mere thirty-eight miles down this bicycle path" . It's all in the bookkeeping.

Whoops, I think this may be quicker: https://stackoverflow.com/a/394512/1992064
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (but no longer ∞ ).
vi) Hakuna matata.
vii) Bookkeeping.
  Reply With Quote
Old January 11th, 2022, 04:48 PM   #5
busarider29
Lifetime Supporting Member
United States

busarider29 is offline
 
Join Date: Aug 2013
Location: Midland, MI
Posts: 368
Until I see a better platform, my recommendation for PLC platform remains the same - Beckhoff with TwinCAT-3 software.
Basic arithmetic and trig functions
Extended mathematical functions (paid for library)

If those aren't enough, you can always add the free OSCAT user-made functions and function blocks library, loaded with all the math functions you could ever realistically ask for, plus many, many others.
OSCAT Library documentation
OSCAT (adjusted for TwinCAT) download

Matrix Math (TcMatrix) library for TwinCAT

TF6350 - enables the transmission of SMS messages or emails using PLC function blocks
SendSMS Function Block

Last edited by busarider29; January 11th, 2022 at 05:35 PM.
  Reply With Quote
Old January 11th, 2022, 06:52 PM   #6
L D[AR2,P#0.0]
Lifetime Supporting Member
United Kingdom

L D[AR2,P#0.0] is offline
 
Join Date: Nov 2006
Location: UK
Posts: 6,617
FYI the S7-1200 would allow you to implement a calibration table if desired.
__________________
S7-300 to 1500 conversions done - email (minus the spam) to spams7conversions@hotmail.com
  Reply With Quote
Old January 11th, 2022, 08:18 PM   #7
CENTER
Lifetime Supporting Member
United States

CENTER is offline
 
CENTER's Avatar
 
Join Date: Nov 2003
Location: Long Island NY
Posts: 135
The way we have been doing this is by using the flow meter pulses and adding what ever per 10,100 or 1000. For gas we were adding as the trucks were filling at the rack. Same gas different additive for each brand.
  Reply With Quote
Old January 11th, 2022, 08:33 PM   #8
sengle
Member
New Zealand

sengle is offline
 
Join Date: Jan 2022
Location: Auckland
Posts: 13
Quote:
Originally Posted by drbitboy View Post
If the PLC does not have trig functions but does have floating point math, they are, in principle, straightforward to approximate (cf. https://ntrs.nasa.gov/api/citations/...9700026648.pdf), six digits of accuracy is only two terms, but the kabuki dance needed to get to those two terms is even longer, so the only question is whether the logo PLC can provide entough instructions.
Thank you very much for your response.
The Logo doesnt do floating point math, so I guess that its not an option.
My head hurts looking at that document!
  Reply With Quote
Old January 11th, 2022, 08:38 PM   #9
sengle
Member
New Zealand

sengle is offline
 
Join Date: Jan 2022
Location: Auckland
Posts: 13
Quote:
Originally Posted by busarider29 View Post
Until I see a better platform, my recommendation for PLC platform remains the same - Beckhoff with TwinCAT-3 software.
Basic arithmetic and trig functions
Extended mathematical functions (paid for library)

If those aren't enough, you can always add the free OSCAT user-made functions and function blocks library, loaded with all the math functions you could ever realistically ask for, plus many, many others.
OSCAT Library documentation
OSCAT (adjusted for TwinCAT) download

Matrix Math (TcMatrix) library for TwinCAT

TF6350 - enables the transmission of SMS messages or emails using PLC function blocks
SendSMS Function Block
Very interesting thanks. I had no idea that Beckhoff made such a product.
I have spent the afternoon looking around their site, and reading the manuals etc and have learnt a lot!

Unfortunately, in my requirements, I failed to say that I also wanted to contact/interrogate the device via SMS/txt.
The TF6350 SMTP/SMS Solution appears to be only Outbound?
  Reply With Quote
Old January 11th, 2022, 08:47 PM   #10
sengle
Member
New Zealand

sengle is offline
 
Join Date: Jan 2022
Location: Auckland
Posts: 13
Quote:
Originally Posted by L D[AR2,P#0.0] View Post
FYI the S7-1200 would allow you to implement a calibration table if desired.
Thanks for this info!
I cant find any doc or reference to this in the manual.
Conceptually - how would this be done?

Cheers,
Steve
  Reply With Quote
Old January 11th, 2022, 09:03 PM   #11
sengle
Member
New Zealand

sengle is offline
 
Join Date: Jan 2022
Location: Auckland
Posts: 13
Quote:
Originally Posted by CENTER View Post
The way we have been doing this is by using the flow meter pulses and adding what ever per 10,100 or 1000. For gas we were adding as the trucks were filling at the rack. Same gas different additive for each brand.
Yes this would be ideal and so much simpler.
However, we have no control over the filling process at all and cant capture flow rate during the fill
  Reply With Quote
Old January 11th, 2022, 10:39 PM   #12
CENTER
Lifetime Supporting Member
United States

CENTER is offline
 
CENTER's Avatar
 
Join Date: Nov 2003
Location: Long Island NY
Posts: 135
A flow meter would be the way to go. Probably less expensive, more accurate and very simple. You can use tank gauges. I did a job with omntec and was able to get a 0/10 output to use for other equipment + around here you need a approved high tank alarms.
https://morbros.com/products/gauges-...tronic-gauging
https://www.omntec.com

Last edited by CENTER; January 11th, 2022 at 10:42 PM.
  Reply With Quote
Old January 11th, 2022, 11:00 PM   #13
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 7,007
Quote:
Originally Posted by sengle View Post
Thank you very much for your response.
The Logo doesnt do floating point math, so I guess that its not an option.
My head hurts looking at that document!

What type of math does Logo have available? Can you point to a manual? I am looking at this and there isn't even fixed point math available.

I find it hard to believe that hardware could handle SMS.


What sort of accuracy are you after?
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (but no longer ∞ ).
vi) Hakuna matata.
vii) Bookkeeping.

Last edited by drbitboy; January 11th, 2022 at 11:25 PM.
  Reply With Quote
Old January 11th, 2022, 11:47 PM   #14
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 7,007
Quote:
Originally Posted by sengle View Post
We have an Analog pressure/level sensor which needs to understand/realise when the tank is topped up with diesel and that will trigger the Doser Pump routine.
You are thinking of something like this?

The program can be in one of several states:
  • Idle
    • Dosing not needed
    • Level is stable i.e. not changing, beyond some measurement deadband, over some time, say half an hour
  • Filling or draining: level is not stable
  • New stable level:
    • If new level is lower than last stable level
      • Save new level as last stable level
      • Return to Idle state
    • If new level is higher than last stable level, then
      • calculate dosing needed
      • execute calculated dosing
      • Save new level as last stable level
      • return to Idle state
Depending on accuracy required, the dosing calculation probably could get away without trig functions; a naive numerical integration scheme is possible with integer multiplies, adds, and compares, although overflow will have to be dealt with, depending on the raw range of the pressure sensor.

But the extra effort to develop such a scheme would pay for a more capable PLC, many times over.
__________________
_
Brian T. Carcich
i) Take care of the bits, and the bytes will take care of themselves.
ii) There is no software problem that cannot be solved with another layer of indirection.
iii) Measurement is hard.
iv) I solemnly swear that I am up to no good
v) I probably have the highest ratio of forum posts to actual applications in the field (but no longer ∞ ).
vi) Hakuna matata.
vii) Bookkeeping.

Last edited by drbitboy; January 11th, 2022 at 11:50 PM.
  Reply With Quote
Old January 12th, 2022, 04:24 AM   #15
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: ᚴᚬᛒᛅᚾᚼᚬᚠᚾ
Posts: 16,008
S7-1200 can definitely do the job.
I dont know if there is library function to do a calibration table, but even if there is I would prefer to write my own in SCL (equivalent to Structured Text).
I wouldnt use the Calculate block.
There should be plenty memory available.

I think that any modern PLC can do the job easily. Especially if it supports Structured Text.
A 'smart relay' such as a Logo will probably be hard pressed to do the job. Not impossible, using integer math and various tricks, but the saving on hardware will be lost in time spent to get it working.
__________________
Jesper
NOTICE:
JesperMP has passive-aggressive tendencies, can be impolite and may even use sarcasm !
Also: ᛁᚠ ᚢᚬᚢ ᚴᚬᚾ ᚱᛅᚬᛏ ᚦᛁᛋ ᚦᛅᚾ ᚢᚬᚢ ᚼᚬᚠᛅ ᚴᚬᛁᚾᛅᛏ ᛘᚢ ᚱᛅᛋᛒᛅᚴᛏ
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Fuel oil tank level tcarafi LIVE PLC Questions And Answers 13 July 11th, 2015 02:55 PM
SIEMENS S5 Questions...How to Upload a Project from a PLC to Laptop??? Grzyb LIVE PLC Questions And Answers 4 June 21st, 2015 08:39 AM
PLC small project problems wolves-32 LIVE PLC Questions And Answers 3 February 13th, 2013 07:11 PM
How PLC displays tank levels on touch screen graph. termus123 LIVE PLC Questions And Answers 5 December 20th, 2012 02:59 PM
please help me with my plc project :( runawayshinobi35 LIVE PLC Questions And Answers 3 April 17th, 2011 09:54 PM


All times are GMT -4. The time now is 05:58 AM.


.