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 12th, 2022, 09:14 AM   #16
busarider29
Lifetime Supporting Member
United States

busarider29 is offline
 
Join Date: Aug 2013
Location: Midland, MI
Posts: 255
Quote:
Originally Posted by sengle View Post
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?
Unusual requirement, but sending messages to the PLC from your phone can be done, but just maybe in a different way. At least one way that I know of is to use the MQQT protocol via TF6701 TwinCAT 3 IoT Communication. From my understanding, there are MQQT phone apps that you can then use to send messages to the broker, which then get relayed to the PLC.
  Reply With Quote
Old January 12th, 2022, 09:14 AM   #17
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 4,174
Quote:
Originally Posted by JesperMP View Post
...the saving on hardware will be lost in time spent to get it working.
+1; get a better PLC.

Reliably detecting a filling event will likely be more difficult than calculating the dosing.

Calculations are easy; measurements are hard.
__________________
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) I solemnly swear that I am up to no good

Last edited by drbitboy; January 12th, 2022 at 09:16 AM.
  Reply With Quote
Old January 12th, 2022, 04:34 PM   #18
sengle
Member
New Zealand

sengle is offline
 
Join Date: Jan 2022
Location: Auckland
Posts: 13
Quote:
Originally Posted by drbitboy View Post
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?
Logo manual here:
https://support.industry.siemens.com...?download=true
No it doesnt look like it can do floating point math.

Surprisingly it handles modem integration quite well and the Logo has a specific dedicated CMR2020 modem for it.
https://support.industry.siemens.com...?download=true


Up to +-5% is acceptable.
  Reply With Quote
Old January 12th, 2022, 04:36 PM   #19
sengle
Member
New Zealand

sengle is offline
 
Join Date: Jan 2022
Location: Auckland
Posts: 13
Quote:
Originally Posted by drbitboy View Post
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.
Yes this is exactly what is required. Thank you for summarising it perfectly!
What PLC would you recommend that would be capable?
  Reply With Quote
Old January 12th, 2022, 04:38 PM   #20
sengle
Member
New Zealand

sengle is offline
 
Join Date: Jan 2022
Location: Auckland
Posts: 13
Quote:
Originally Posted by JesperMP View Post
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.
Thanks Jesper. Totally Agree it makes sense to get capable Hardware rather than lost time looking for workarounds
  Reply With Quote
Old January 12th, 2022, 04:42 PM   #21
sengle
Member
New Zealand

sengle is offline
 
Join Date: Jan 2022
Location: Auckland
Posts: 13
Quote:
Originally Posted by busarider29 View Post
Unusual requirement, but sending messages to the PLC from your phone can be done, but just maybe in a different way. At least one way that I know of is to use the MQQT protocol via TF6701 TwinCAT 3 IoT Communication. From my understanding, there are MQQT phone apps that you can then use to send messages to the broker, which then get relayed to the PLC.
Thanks for looking into this.
There is no LAN/WAN connectivity unfortunately.
These are 30 Remote sites which will all have this standalone PLC solution, so we need to be able to contact/interrogate the PLCs.
  Reply With Quote
Old January 12th, 2022, 05:47 PM   #22
Tom Jenkins
Lifetime Supporting Member
United States

Tom Jenkins is offline
 
Tom Jenkins's Avatar
 
Join Date: Apr 2002
Location: Milwaukee, WI
Posts: 6,199
You need floating point, but you can do the calculation with multiplication and addition based on level.
Attached Files
File Type: xls Horizontal_Tank.xls (37.5 KB, 12 views)
  Reply With Quote
Old January 12th, 2022, 07:11 PM   #23
busarider29
Lifetime Supporting Member
United States

busarider29 is offline
 
Join Date: Aug 2013
Location: Midland, MI
Posts: 255
Quote:
Originally Posted by sengle View Post
Thanks for looking into this.
There is no LAN/WAN connectivity unfortunately.
These are 30 Remote sites which will all have this standalone PLC solution, so we need to be able to contact/interrogate the PLCs.
Here you go.....

CU8210-D004-0103: LTE USB modem.

See pg. 8 of the documentation here. - "The USB stick can also receive and send text messages using the Short Message Service (SMS)"

Add the Cabinet dome for protection of the device.

Explore the various IPCs and Embedded PCs available. It appears your application is rather small and simple. Any IPC or CX equipped with USB port should work just fine. For applications where the PC/CX might be exposed to harsher environments, I would opt for something in the CX line (Embedded PC).

CORRECTION EDIT: The LTE stick can only operate with Windows 7, Windows 10, or TwinCAT BSD. This limitation may inherently omit a few of your options for PC/CX selection, as some of the "Economy" CX's are only available with Windows CE (ex..CX9020).

Last edited by busarider29; January 12th, 2022 at 07:31 PM.
  Reply With Quote
Old January 13th, 2022, 12:52 PM   #24
Peter Nachtwey
Member
United States

Peter Nachtwey is offline
 
Peter Nachtwey's Avatar
 
Join Date: Apr 2002
Location: United Welfare States of America
Posts: 7,719
Quote:
Originally Posted by mylespetro View Post
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
I would use a look up table. I would generate it using Mathcad but most would use Excel. Then do linear interpolation betweeun the points. If I needed more accuracy I would use Lagrange interpolation which is a 3rd order interpolation but I doubt this is required.
__________________
"Living is easy with eyes closed, misunderstanding all you see...." Strawberry Fields Forever, John Lennon
  Reply With Quote
Old January 13th, 2022, 01:34 PM   #25
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 4,174
Quote:
Originally Posted by Peter Nachtwey View Post
If I needed more accuracy I would use Lagrange interpolation which is a 3rd order interpolation but I doubt this is required.
It is not; if accuracy to a percent or so is acceptable and square root is available (but no trig e.g. MicroLogix 1100), then linear is good enough (below from @Tom Jenkins's sheet; see here also).
xxx.png
atan(1) would be replaced by 0.785... in the actual case.

But on MicroLogix the lookup table would be available anyway.
__________________
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) I solemnly swear that I am up to no good
  Reply With Quote
Old January 13th, 2022, 02:01 PM   #26
busarider29
Lifetime Supporting Member
United States

busarider29 is offline
 
Join Date: Aug 2013
Location: Midland, MI
Posts: 255
Here you go....

FB_CTRL_LIN_INTERPOLATION

The caveat is that the above FB is part of a paid-for library (TF4100 Controller Toolbox), meaning if you want to use this for all 30 PLC's, you would need to purchase this library for each one of those 30 stand-alone PLC's. The cost of the library is dependent on the 'Performance Level' of the IPC/CX. We purchased the library for a performance level 70 IPC, and I believe the cost of it was ~$450 USD. For your application, a performance level 40 IPC/CX is all you would require, and that's only because you need the modem USB stick, which requires Win7 or Win10.

A much cheaper option in lieu of the TF4100 Controller Toolbox library:
Explore the FB's and Functions in the free OSCAT library I linked in a previous post, particularly "LINEAR_INT" on page 101, and "POLYNOMIAL_INT" on page 102. One of those should work for your application. The OSCAT library is free!!

You could also just code a polynomial in your logic. I did that for two of our machines in RSLogix500, with some pre-work in Excel.
  Reply With Quote
Old January 13th, 2022, 02:42 PM   #27
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 4,174
Math is not the problem for any but the most rudimentary processor; this could be done even if only integer math was available, though it would be a mess.

So to answer the OP, look for something that handles the SMS requirement cleanly and has either floating point with square root, or the capability to store a lookup table.

A lot less time is going to be spent coding how much to dose than coding when to dose.
__________________
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) I solemnly swear that I am up to no good
  Reply With Quote
Old January 13th, 2022, 09:45 PM   #28
sengle
Member
New Zealand

sengle is offline
 
Join Date: Jan 2022
Location: Auckland
Posts: 13
Quote:
Originally Posted by Tom Jenkins View Post
You need floating point, but you can do the calculation with multiplication and addition based on level.
Thanks Tom
  Reply With Quote
Old January 13th, 2022, 09:47 PM   #29
sengle
Member
New Zealand

sengle is offline
 
Join Date: Jan 2022
Location: Auckland
Posts: 13
Quote:
Originally Posted by busarider29 View Post
Here you go.....

CU8210-D004-0103: LTE USB modem.

See pg. 8 of the documentation here. - "The USB stick can also receive and send text messages using the Short Message Service (SMS)"

Add the Cabinet dome for protection of the device.

Explore the various IPCs and Embedded PCs available. It appears your application is rather small and simple. Any IPC or CX equipped with USB port should work just fine. For applications where the PC/CX might be exposed to harsher environments, I would opt for something in the CX line (Embedded PC).

CORRECTION EDIT: The LTE stick can only operate with Windows 7, Windows 10, or TwinCAT BSD. This limitation may inherently omit a few of your options for PC/CX selection, as some of the "Economy" CX's are only available with Windows CE (ex..CX9020).
Thanks very much for your detailed response.
I am very impressed with Beckhoffs offerings and am in touch with the New Zealand agent now. Cheers!
  Reply With Quote
Old January 13th, 2022, 09:48 PM   #30
sengle
Member
New Zealand

sengle is offline
 
Join Date: Jan 2022
Location: Auckland
Posts: 13
Quote:
Originally Posted by drbitboy View Post
Math is not the problem for any but the most rudimentary processor; this could be done even if only integer math was available, though it would be a mess.

So to answer the OP, look for something that handles the SMS requirement cleanly and has either floating point with square root, or the capability to store a lookup table.

A lot less time is going to be spent coding how much to dose than coding when to dose.
Thank you very much for taking the time to look at this for me.
Cheers!
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


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 03: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 09:39 AM
PLC small project problems wolves-32 LIVE PLC Questions And Answers 3 February 13th, 2013 08:11 PM
How PLC displays tank levels on touch screen graph. termus123 LIVE PLC Questions And Answers 5 December 20th, 2012 03:59 PM
please help me with my plc project :( runawayshinobi35 LIVE PLC Questions And Answers 3 April 17th, 2011 10:54 PM


All times are GMT -4. The time now is 03:02 PM.


.