PLC guidance needed

noob saibot

Member
Join Date
Aug 2005
Location
Vancouver, BC
Posts
16
I am going to try to provide as much information as I can.

Ok, I am new to PLC programming, I don't normally do this by trade. I have built a few small control panels and know ladder logic pretty well. I have done several tutorials and read the siemens s7-200 manual cover to cover.

What I need to do is convert a NI Fieldpoint control system to PLC. I wired the entire system but it was one of those projects where someone else sorta roughly sketched it and I had to fill in the blanks. He programmed it (labview), but since he has left the company I am stuck with it. I understand exactly how it works right now because I had to do all the documentation for the control logic. My boss would like me to be able to service the system as it is portable and if repairs/adjustments/troubleshooting must be done, I would have to do them on site. The labview program is quite difficult to troubleshoot and is more complicated than we need not to mention flaky (as with a lot of the software this person wrote for us), it has been decided that we should use a PLC. The total # of I/O is roughly 4DI 9DO 8AI.

Here is what I need to do (a rough description):

The system is a cascade fueling system which has 3 banks of cylinders which are sequenced to fill a single tank within 30sec. There is a data cable connected to the tank to be filled which will transmit temperature and a ground confirmation to make sure it is connected. The tank pressure is taken at the outlet of the dispenser. The source banks also have pressure sensors at their manifolds. We will be monitoring 2 thermocouples in the process piping on the dispenser as well as the pressures. These need to have limits set that will shutdown the system in case they are too high.

It should work like this:

Once the PLC is energized the ready light will be maintained if all conditions are safe to fuel until the start button is pressed. If the start button is pressed the ‘ready’ light will change to the ‘in progress’ light if all conditions are safe. Conditions must remain safe during this process to avoid shutdown. The first solenoid will open and dispense gas until either the pressure/temperature curve is met or 5 seconds elapses. Then the first solenoid will close and the second solenoid will open. The ‘in progress’ light will blink and remain on during this transition. When the second stage either reaches the pressure/temperature curve or the 5 second limit, it will close the second solenoid and open the third. The transition will occur exactly as the previous stage. The final stage will complete by closing the third solenoid when either the pressure/temperature curve is reached or 15 seconds has elapsed. The ‘in progress’ light will turn off and the ‘fueling complete’ light will illuminate for 10 seconds. The fueling station will then return to its ready state. A stop button will stop the process for what ever reason the operator chooses to stop for, and an Estop will have to cut power completely.


During the entire process the station will be monitoring fueling conditions. These will include. Tank Temperature, Tank Pressure, Process Temperature and Ground Status.


Since we are dealing with flammable gas at high pressure, the system must shutdown if any temperatures or pressures are out of range, or if the ground line breaks. So these signals must be monitored constantly while running the filling process.

As it sits now with the NI controls, A lookup table is used to determine whether we have reached the pressure/temperature curve.

From the description I have given our suppliers they have recommended the s7-200.

'takes breath'

ok so my question is where do I start? This micro/win thing isn't quite what I'm used to as far as programming goes. You can't exactly have a 'state machine' where you can program all your bits to be done in sub routines (or can you?) I know there are subroutines but will the signals I want to monitor be able to interrupt the process the way I want them to? if they can should I use interrupts to handle the exceeding of limits? Also the fueling process must not be done all in one scan since it will take a minimum of ~35sec. So it must have to all run in parallel. How do you sort these things out?

The tutorials etc. handle all the details of using the instructions and have examples of simple processes, but I think what I have to do here is beyond that scope, yet I have a very small system compared to what most of you deal with (stuff I have found using the search function here). I am mainly concerned about how to structure the program and implementing the lookup table ( or possibly using math to do that ). Would I be better off getting someone else to do it? Would I still be able to easily troubleshoot it if I didn't write the program? One other thing is how do I use the thermocouple and thermistor modules?

THanks in advance I know this is a huge can of worms. Especially for a first post :(
 
First of all, welcome. I think you'll like it here.
Second of all, good description to start with. It certainly beats 'I have to pump some gas. How do I program that?'.

Now, from the bottom up. If you were doing a bread loader or conveying gravel, you doing it on your own would be a no-brainer. I would say by all means go for it. But you are moving around highly flammable materials. The results of failure could be catastrophic. This may not be the type of project you want to get your feet wet with. You should at least do some looking around to see if there is somewhere you can get some qualified help other than this forum. I wouldn't be concerned about being able to understand another persons logic. Stay involved in the software development and make sure you list any concepts or tools you DON'T want to use (multiple instance subroutine calls, for example). But, generally speaking, if you feel comfortable with the general format of a plc program (ladder logic, limited address space, etc) you will be fine.

I don't have any real experience with the S7-200. All the stuff I have done has been with an S7-300. But if you want to efficiently implement a look-up table you will need indirect addressing. I don't know if the S7-200 supports that. Processing speed doesn't sound like an issue. It sounds like your process is slow enough that a plc won't get swamped.

While many plcs don't directly support state machines you can pretty easily construct your own. That is the tool I would use based on you description. The easiest method I have found for doing that is use an integer to hold your current state value and then perform actions based on the states. You can either selectively call subroutines based on the state value or use equality checks firectly in you logic. Either way keep the state driver section separate from the logic based on the states. It's just easier to follow that way.

Keith
 
Last edited:
noob saibot said:
...an Estop will have to cut power completely
noob saibot said:
Since we are dealing with flammable gas at high pressure, the system must shutdown if any temperatures or pressures are out of range, or if the ground line breaks. So these signals must be monitored constantly while running the filling process.(
The PLC is NOT the sole controller of this, right?

🍻

-Eric
 
Last edited:
Noob,

It sounds like you will require a combination of analog inputs...pressure and temperature. This will require different analog modules. If you go with transmitters for your temperature signals, then you can use the same type of analog module, but it will add to the cost of your equipment.

Are you going to use RTDs, Thermocouples or Thermistors to monitor your temperature?

From what I have been told by others, Siemans is not the easiest programming to start with. Is Siemans the controller you want to go with?

If you were interested in considering other options, you can contact us and speak to one of our programmers about your application...they may have some different methods to do what you are looking to do. The drawback is that it would be specific to our controllers.

Many of the questions you have will depend on what controller you use and how you set up your application in terms of how easy or hard it is to trouble shoot.

If interested you can obtain our contact information through our web site or email us directly and we will contact you.

In terms of continuous monitoring, you may want to consider two controllers (redundant monitoring).

Hope this helps

God Bless,
 
I knew I would forget something, the system is separated into 3 skids, one has the storage tanks, regulators and solenoids etc.

the second is the dispensing side which is piped from the first skid, it controls the final release of gas and contains the thermocouples and some pressure sensors for measuring and dispensing the gas (hydrogen).

the third is a power distribution box which is separate aside from its cables to connect power to the dispenser and storage skids. It also connects to hydrogen detectors and has a bunch of relay logic to cut power if there is a H2 leak etc.

So no, the PLC is not the only control system, there is hard wired controls in a separate box for power etc.


We have been quoted pricing for the s7-200,
for a grand total of $2100 of our canadian dollars we get:

1x s7-200 cpu 224 (14DI 10DO)
2x EM 235 (4 AI)
2x EM 231 (1 w/ 2 AI RTD INPUTS the other w/ 2 T/C)
1x PC/PPI cable
1x S7 micro win software/license
1x Memory module MC 291

We were also quoted a similar option for an OMRON CMP2A which came out to $3500 canadian

Furthermore, there is an automation company we deal with that Quoted $80cdn/hr for a PLC consultant to help me (seems cheap and good)

I may be better off working with someone else to program it. What do you think?

Also are there some other brands that would suit my needs, I tried to get a hold of some AB distributor but they never got back to me.
 
Just quickly reading through your description this sounds like something a DL06 could handle very easily by using stage programming.

How complex is the temp/pressure curve? If its a relatively simple curve the math shouldn't be too bad in the DL06; if its a bit complex then the math shouldn't be too bad in the DL06 as soon as the new programming software comes out (v5 is in beta and VERY cool).


I'll also echo others that you'd better know exactly what you are doing, but to me it sounds like you do so I'll continue...

I'd setup the program as follows:



-- STAGE 0 (initial stage) --
Setup analog cards
Create lookup tables (if needed)
Various other initialization stuff
jump to STAGE 1
jump to STAGE 2

-- STAGE 1 (safety monitor stage) --
Monitor all safeties, if any safety is not satisfied reset STAGES 3-6 and set STAGE 2
if all safeties are satisfied output to C0

-- STAGE 2 (monitor for start) --
if C0 then output 'ready' light
if START then jump to STAGE 3

-- STAGE 3 (fueling stage 1) --
start a 5s timer
output 'in process' light
output solenoid #1
if temp/pressure curve is met then jump to STAGE 6
if 5s timer expires jump to STAGE 4

-- STAGE 4 (fueling stage 2) --
start a 5s timer
output 'in process' light
output solenoid #2
if temp/pressure curve is met then jump to STAGE 6
if 5s timer expires jump to STAGE 5

-- STAGE 5 (fueling stage 3) --
start a 15s timer
output 'in process' light
output solenoid #3
if temp/pressure curve is met then jump to STAGE 6
if 15s timer expires jump to STAGE 7

-- STAGE 6 (fueling complete) --
start a 10s timer
output 'fueling complete' light
when 10s timer expires jump to STAGE 2

-- STAGE 7 (fueling error) --
start a 10s timer
output 'fueling failed' light
when 10s timer expires jump to STAGE 2
 
Last edited:
Sounds like an Entertron "Elite 2000" PLC is just what you are looking for. They will be competetive with what you've mentioned, software is FREE, and so is the Tech Support.

Here is a "LINK" to the ELite 2000.

I think that you will be very atisfied with it. There products are very high quality. The outputs have higher ratings, and the PLC warranty is outstanding.

Their software is considerably easier then Siemens. You can download their software and manual from the Entertron site. There is a built in simulator, so you can check the system out with having a PLC.

best regards.....casey
 
OK so you are handling hydrogen at high pressure -- I assume in the vicinity of 2,000 psi. Definitely something you want to be careful with as with ANY high pressure gas or liquid. I assume you know all about the safety precautions of handling high pressure hydrogen.

I think the first thought is why automated? Why not manual with a qualified operator?? Is this even an option??

IF you HAVE to go auto I think you should study up on
(sorry I gotta go with US standards - please translate to Canadian ie CSA ??)
Nat'l Elect Code and NFPA to determine hazardous location criteria ie Class 1 Div (1 or 2 ??)

I also wonder about this being portable - what is the power supply for PLC controls is there a backup power supply?

LAST should this be done with a Safety PLC ??(now we are really in my ignorant area so this will have to be dealt with others more knowledgable and qualified than I.

Dan Bentler
 
Thank you for the prompt responses by the way, this is great!

Let's see here, the pressure temperature curve is practically a straight line, it's a 2x16 array I think, so a total of approx. 32 numbers in total, very small.

As for as the safety goes, this may sound nuts, but it is 6,000psi !!
We have been decked out with intrinsically safe barriers since the get go to any signals that are in classified areas have been dealt with appropriately (hence the 3 skids with large distances between them) The current design has been through a couple of Hazops and has been inspected by a qualified hydrogen safety inspector (very morbid guy, he used to work for nasa) also the process design has been signed off by the appropriate engineer.

Also we made the system to comply with NFPA and IFC International standards. We usually also have local fire marshalls from wherever it is setup to approve the device and sight layout.

The reason it needs to be automated is that some of our company's value comes from this fast fill (~30sec).

It needs to travel to test sites which is why it needs to be portable. It is used outdoors and has in the past, been connected to both 120v from buildings and diesel generators. The DC power supplies are in the 3rd skid (power distribution box). We usually setup up this system at the site for short periods in which we are there (1week to a month). It is used maybe 3-8 times a day in let's be generous and say 1-2 min periods.

We want it to be ok with the power being cut at anytime, (the solenoids fail closed) it is part of our safety strategy to cut power upon a hydrogen leak. So having a back up isn't really an issue. It has to be built to handle this.

Can a PLC handle having its power cut at anytime? Our estop currently cuts everything that comes from the power distribution box, the hydrogen detectors will cut everything except what the power distribution box is plugged into.
 
Last edited:
I assume you mean a power cut from an emergency stop scenario? A PLC will not complain if you kill power to it, but it's usually better to leave a PLC powered and simple 'let it know' (via an input) that system power is off. In your logic, you'll take the required action(s) necessary for an emergency stop condition.

From what you've described, it sounds like an easy application for any PLC. The only problem you face is getting 'up to speed' with the programming. I've been away from Siemens stuff too long to be of any help with specifics, but there are plenty of Siemens 'gurus' here that will help with any roadblocks you come across... :nodi:

🍻

-Eric
 
I'll agree with Eric. It sounds like you've got all or at least the vast majority of the safety concerns covered. Just about any PLC should be able to do this without any problem; in the end it will be a matter of what you want to use and what you can afford to use...
 
The money spent on getting someone in to help you will be well spent, the job will happen quicker and if he is competent then the code will be more robust and easier to fault find. + you get free lessons while he does the work. This sort of job is not one to use as your learning curve. As an aside I would say Siemens is one of the harder PLCs to learn to program, nothing wrong with them but an AD may be a bit easier for you.
Word of warning though: AD does not have true online editing, so if you are downloading an edit the outputs will freeze during the edit download. Probably wont be a problem in your application but be wary of it.
Regards Alan Case
 
Will there be support for DIRECTLogic PLCs locally in Canada? Or will any PLC tech be able to program with it. I'm not familiar with the brand at all so I'm not sure if its popular like Siemens, AB, Omron etc.
 
AutomationDirect does direct marketing so there probably won't be a local rep to call or visit. I think they have a few, but not many.

Give their web site a look http://www.automationdirect.com or give their tech support a call and discuss it with them... Even better download the trial version of DirectSoft and see what you can make of it.
 
I downloaded the Demo software, I have gone through some example programs and it seems much more suitable than the siemens s7-200, it is also half the price.
 

Similar Topics

As mentioned in the title, I want to learn about PLC systems. Long story short: I had to strip out a plant room. Everything was going to the...
Replies
9
Views
2,604
Hi Friends, I'm making a PLC operated chocolate vending machine, using a CLICK Basic PLC (C0-00DD2-D) which has 2 x RS232 ports. I'm also using...
Replies
0
Views
1,533
Hey guys, I'm new to the PLC world, ive done lots of reading on this website and it really made me realize ive barely scratched the surface. The...
Replies
8
Views
2,249
Dear All, If you have any plc pdf with step by step explanation which will guide me to learn basic programming, i use TLP LogixPro software...
Replies
2
Views
3,772
Hello everybody. I am into technical marketing of various automation products except PLC's. Recently I have been given the responsibility of after...
Replies
3
Views
3,592
CheezyMane13
C
Back
Top Bottom