Working cycles depending on temperature

cbofkw

Member
Join Date
Sep 2004
Posts
3
Hi guys, I know it might be stupid questions for most of you, but it is unclear for me. I’m new in RLL programming and I’m trying to work my pump in certain intervals according to the temperature and humidity from analog inputs. I’m using DL-06 from Automation Direct with analog input expansion module. All is programmed in their directsoft32. Can you please have a look on my program if I’m on the right track? What I want to do is after temperature and humidity sensors send the right data; pump starts working in cycles (On/Off) until the sensors sees higher temperature. If so, pump will be on for longer time than in previous cycles. These cycles can be whole day or just few minutes depending on the temperature and humidity. I also have switches to turn on or off different zones, but one zone will be working all the time. By flipping the switch you can add another zone to current program, but it has still to read inputs from sensors. Please review attached file (if is not too much to ask) and please send me some hints. Your help is appreciated and welcomed. BTW I’m in your SETI group since yesterday as Pavouk.
Michael Suchan
 
Michael,

First off... there is no reason for you to assume that any of us have the DirectSoft Software. You would do better to post your code with something that most people can view... pdf, word.doc, gif, jpeg... etc.

Second... all we know about your situation is what you describe.

Here's a hint on reasonable process development...

All process development is based on reasonable questions.

Reasonable questions are based on knowing what you want and then asking how to get from here to there.

You need to clearly understand what you want so that you can pose reasonable questions to yourself.

In most cases, if one understands one's situation, and then, if one asks one's self reasonable questions, then one has a good chance of answering one's own questions without seeking help.

Your questions MUST be based on a reasonable understanding of what you want. If you can't describe, for yourself, what you want, then you can't pose reasonable questions to others.

If you can't describe what you want then you can't expect us to be able to understand a process that you, either, can't explain or don't understand.

It is your burden to clearly explain your situation and then ask reasonable questions.

If you can't describe what you want to some "Joe off-the-street" then you don't understand what you want.

Don't even take this as a negative-slam... take it as constructive criticism. What I am suggesting is that you employ what is called "Critical Thinking". Critical Thinking is the single, most important tool that a potential programmer needs to develop. If you can develop this skill then you've got PLC programming by the short-hairs!

The whole game of PLC programming is "cause & effect". You need to clearly understand the various "causes" and the desired "effects".

In general, you work backwards from "final effects" to "previous causes" until you work back to "initial causes". Most of this thinking occurs in the mind. The "mind" MUST understand the desired effects and the causes that produce those effects.

This means you need to "sort through" all of the potential conditions and organize them so that they produce the desired effects at the appropriate times.

This can be a hard process to go through... it is, however, the fundamental mental process to go through. Again, if you can develop this skill then you've got PLC programming by the short-hairs!

YOU CAN DO IT! Let us see what you think.

(58)
 
Terry Woods said:
First off... there is no reason for you to assume that any of us have the DirectSoft Software. You would do better to post your code with something that most people can view... pdf, word.doc, gif, jpeg... etc.

Good point. Here you go...

[attachment]

beerchug

-Eric
 
First of all thank you Eric for converting code into a PDF. As I wrote I’m new to forum and whole PLC. I assumed that lot of people are using DirectSoft. My bad. Now I’ll try to be more specific: I wrote some logic for cycling (see PDF starting at line 81) the pump. I’m just not sure if this is the right way to do it. I need the pump to cycle 10 sec on 30 sec off and the again 10 sec on 30 sec off etc until V2000 changes value and then the pump cycle changes to 15 sec on 25 sec off. This cycle is turning on Y0 and Y5 getting inputs from V2000. Is this constructive thinking as you described Terry?
Thank you for all your inputs and criticism. I need it in order to be a good programmer. I don’t want to be somebody’s burden but with help I can understand things easier.
Michael
 
The program of a thousand rungs begins with a single coil

Lets break this down, piece by piece, shall we?

I need the pump to cycle 10 sec on 30 sec off and the again 10 sec on 30 sec off etc

What you have in your code is the following (editted for clarity):

T0 +-TMRF---+
-----|/|-------------| T0 |
| K1000 |
+--------+

T0 +-TMRF---+
-----|/|-------------| T1 |
| K3000 |
+--------+

PUMP
T0 Y0
-----| |--------------( )



What happens if you run just this code? (Turn your monitor over for the answer)

[flipv][fliph]
After a delay of 10 seconds, the T0 will be done. This will fire the pump for one scan. After which, T0 will start counting again. Again, after 10 seconds, the timer will time out, and the pump will again spring to life for a whopping single scan (~10 msec)
Meanwhile, T1 will start counting, trying to get to 30 seconds. After 10 seconds, since T0 will be done, T1 wll start all over again. In short, it will never get to 30 seconds.
[/fliph][/flipv]



Fortunately, the above isn't exactly your code. You have two rungs that drive the pump (which is a very, very bad thing to do.Do you understand why?)

After the above logic, you also have:

PUMP
T1 TA1 K0 Y0
-----|/|----| =/= |----------( )



So, assuming that TA1 is non-zero, what happens here?

[flipv][fliph]
Since, from above, T1 is never done, the pump never stops.
Therefore, you have one line of code that almost never starts the pump, and another (that's always in control) that never stops it.(Actaully, you have the output in THREE places - it's in your first rung as well)
[/fliph][/flipv]


Obviously, this isn't what you want.

Try the following program and report back what it does:


T1 +-TMRF---+
-----|/|-------------| T0 |
| K1000 |
+--------+

T0 +-TMRF---+
-----| |-------------| T1 |
| K3000 |
+--------+

PUMP
T0 Y0
-----| |--------------( )



Once you do that, we'll see if we can take you a little further.

(Hopefully the above code does what I think it will. I do not know the DL instruction set, so I'm not sure exactly how the TMRF function works (or what the difference is between it and a TMR, if there is one). Caveat Emptor.)
 
Last edited:
Slight amount of post highjacking detected.......
okay, since I am not quite as computer literate as I could be....


How exactly did you post the upside down text?
 
tom_stalcup said:
How exactly did you post the upside down text?

Tom, I clicked on "view source" and found this:

<div style="width:100%; filter:flipV"><div style="width:100%; filter:flipH">

I'd guess it's the flipH and flipV that does the magic.
 
Secrets revealed

tom_stalcup said:
How exactly did you post the upside down text?

As Doug suggests, I use the vB tags [flipV] and [flipH] together. By reflecting a string of text both vertically and horizontally, I get the "upside-down" effect. Either one by itself is somewhat pointless, but together they add a bit of fun to a student post.

It's like a PLC instruction set: It's not the individual instructions, but the combination, especially when used creatively.

For example, in the above paragraph, it looks like I've typed the vB code should make this text upside-down. Especially if I were to close the tags ([/flipH][/flipV]. So then why isn't this post readable only by Eric (who I assume still has his monitor upside-down. If he hurt his back turning the monitor back to right-side up, he can't blame me - that was his idea, not mine).

It's because when vB parses the above string, it doesn't see [flipV], but [flip[u][/u]V]. Since "[flip[u][/u]V]" is a meaningless tag (i.e., it's not "flipV"), vB doesn't act on it, and my text is readable by all (except cousin Eric).

Although looking at "View Source" is one way of finding out how a post is done, just clicking on the
quote.gif
icon at the end of post will get you all the text as it was actually typed. (just don't click on the "Submit Reply" button.)

A while back, Phil had HTML code turned ON, and I was able to do REALLY creative things (my favorite was making the banghead smilie about 30 times it's normal size. It's just as well that HTML code is OFF. Allowing HTML code also meant allowing JAVA scripts, and someone neferrious could have done bad things to an innocent seeming post.)
 
Last edited:
Re: The program of a thousand rungs begins with a single coil

Allen Nelson said:
Try the following program and report back what it does:


T1 +-TMRF---+
-----|/|-------------| T0 |
| K1000 |
+--------+

T0 +-TMRF---+
-----| |-------------| T1 |
| K3000 |
+--------+

PUMP
T0 Y0
-----| |--------------( )




Allen,
I tried as you showed in the diagram and id did not work, so I modified diagram like this


T1 +-TMRF---+
-----|/|-------------| T0 |
| K1000 |
+--------+

T0 +-TMRF---+
-----| |-------------| T1 |
| K3000 |
+--------+

PUMP
Y0
------------------------( )


And then I had nice cycles like I wanted. I’m assuming now, that I have to use stages in RLLPlus in order to create different timing intervals regarding temperature inputs. I don’t know why, but in a regular RLL program I can not use duplicate outputs in different lines. Let’s say I have pump, that needs to be switched on with switch (zone) 1, but then the same pump is used as a source for zone 2. So I write program on the next line to turn zone 2. After flipping a switch I have pump working only for zone 2 but not for zone one.

Please see attached document and thank you for your help
Michael
 
Just to let you know, I intentionally didn't make it work the way you wanted. I simply suggested (and I was careful in my phrasing) that you try the code I displayed. But I figured if you saw that the output was "ON for 10, and OFF for 30", that you'd get the idea that if you switched the values of the timers, you could make it "ON for 30, and OFF for 10", which is what you want. The code you show looks to me like Y0 will be ON all the time. If it's not, then there's something new about DirectSoft that I don't understand (not hard - I've never used it).

don’t know why, but in a regular RLL program I can not use duplicate outputs in different lines

Because there should only be one coil in control of a single output, that's why. You happen to have a software package that's smart enough not to let you make a stupid mistake. Do a search on this site for "Double coiling" and you will get a very detailed explaination of why you can't do what you are trying.
 

Similar Topics

I am creating a project with WinCC Unified v16 Upd6 (PC runtime) with an S7-1200. The communication is good between the PC and the PLC as I can...
Replies
6
Views
194
I'm fairly new to Rockwell software, I've had some basic training in the past but nothing too advanced. My company and I use Reliable products for...
Replies
11
Views
340
Hi everyone, I am working with micro850, a proximity sensor (FOTEK, PL-05P) and a 3DOF serial arm robot. I use MC_MoveRelative to control the...
Replies
1
Views
62
Has anyone ever seen where you have a tag reading from the plc in scada. In this instance it's just a PEC, I set it up on one scada terminal and...
Replies
0
Views
96
I have a client who periodically experiences network communication issues. Sometimes when I VPN into the site, their SCADA systems will flash comm...
Replies
2
Views
171
Back
Top Bottom