Where to learn about Flags?

CR6890

Member
Join Date
Jan 2023
Location
Texas
Posts
8
Hello. I am working on LogixPro Door Simulator Exercise 4, where you have to program the door to stop going up if the close button is pressed, and vice versa. There is a hint at the end of the instructions that says "The utilization of Binary or Integer Table bits to Flag specific conditions within your program would be appropriate". However, I am unable to find any helpful information that will teach me what those bits are or how to use them to complete this exercise. I have a little bit of PLC experience, but I have never done anything with these bits and tables and would like to learn about them rather than just having someone give me the answer.... Is there a somewhere that does a good job of explaining this to someone who is unfamiliar with it?
 
Based on what you posted, I believe the intent is for you to program a a table or tables that stores the specific conditions in your program. For instance, on a door open / close sequence, a table may include some of the following conditions:
- door raised
- door lowered
- door open request placed
- door open in progress
- door open sequence started, but not complete
- door close request placed
- door close sequence in progress
- door close sequence started, but not complete
- door safety sensor blocked (or clear)
- door open button pressed while close sequence in progress
- door close button pressed while open sequence in progress

These are some examples of status bits that a programmer could set up. They are dependent on the I/O wired and the process description. Hopefully this helps you think through the process required to program a door control.
 
Definition of "flag" for computing:

A variable or memory location that stores true-or-false, yes-or-no information.

To store a state (i.e. open/closed/travel) in a byte/word/etc. some call that a "state flag".

For me a "flag" can be digital or analog.
 
Mark added good general information and definition, which is where I should have started I squirreled right past that and into a specific door operation. Mark's response is the right one, and once you understand that, you can apply that info to developing the flags for each specific process.
 
Guys, I appreciate your responses, but where can I go to learn how to create and use these flags? I see the data tables in the simulator, and I get the 1s and 0s, but how do I assign certain conditions/functions to these bits (or how do I know what bit to use in my program for each condition/function, if that is already determined by the system)? I understand the idea of conditional flags and I understand the logic I need to make the door function as described, but I don't know how to actually do it.

I'm reading the "PLC Registers" section of the tutorial on this site, but I'm not sure that's the right place, or that it's going to get me there from where I am now... Not sure it has enough information/detail for a noob like me.

So per Steve's response, HOW do I create them? And rather than just giving me the answer, is there somewhere I can go that will teach me the basics of this task?
 
Last edited:
Are you seeing something like this?
Untitled.png
If you close the splash screen window on the left, you should see the Project tree window underneath it, which has all the available Data Files (noted):
Untitled2.png
 
Let's consider the example of a pair of limit switches. One of them detects when a door is open, the other detects when the door is closed. For the sake of discussion we'll assume they are wired as normally open devices, that is, their ON state represents the state of the door.

You can consider each of the switches as flags. They represent specific conditions.

Going a step further, if you program two NC contact instructions (XIO) in series with an internal discrete bit as the output of the rung, that internal discrete is a flag that represents the door in transit between states.

If you have a NO (XIC) contact from the 'closed' limit switch drive a one-shot, the one-shot is a flag represents the instant when the door closes.

An exercise for the OP: Assuming the PLC controls the actuators for the door movement, use the states of those actuators to create flags that supplement the transition flag in my example to tell which direction the door is moving in.
 
Thanks guys, I appreciate your help. This site is great btw. Nice to find a forum where people are helpful and where they act like grownups and treat others with dignity and respect. Rare thing these days I'm afraid...... I will definitely be back from time to time and will pass the word around to my coworkers.
 
I think what they ask you to prove is that you handle individual bits, for example in a 16-bit integer.

To know if a certain bit is at 0 or 1 and set a certain bit to 0 or 1 without altering the others.

That is, using masks and bitwise operations, usually AND, OR and NOT
 
Thanks guys, I appreciate your help. This site is great btw. Nice to find a forum where people are helpful and where they act like grownups and treat others with dignity and respect. Rare thing these days I'm afraid...... I will definitely be back from time to time and will pass the word around to my coworkers.

How cute and routine. OP wrote a bunch of cute nonsense and did understand NOTHING.

SOLVE the #8 task.

That is, using masks and bitwise operations, usually AND, OR and NOT

#8 task require timer.

Understanding the task assigned to the OP is very important, as it changes the "psychology" of PLC programming, bringing it closer to OOP. But since he is looking for flags set by someone, I think the task does not correspond to his level.
 
How cute and routine. OP wrote a bunch of cute nonsense and did understand NOTHING.

SOLVE the #8 task.



#8 task require timer.

Understanding the task assigned to the OP is very important, as it changes the "psychology" of PLC programming, bringing it closer to OOP. But since he is looking for flags set by someone, I think the task does not correspond to his level.

Awesome. You totally proved me wrong. I guess there are arrogant people like you everywhere after all. See, I never said I "understood" the answers, I was expressing appreciation that people were trying to help without resorting to insults and rude, demeaning, completely unnecessary comments that make anyone who asks a question feel stupid, while making the person posting the arrogant comment feel smug and superior. But you didn't actually take any time to read my question or understand it. If you would actually take the time to read my question, I was asking where I could go to learn about flags, so yeah, I'm trying to learn, so obviously the whole topic doesn't "correspond to my level". I wasn't asking to be spoon fed or to have someone just give me the answer. Everyone has to learn somewhere, and someone taught you at some point. Too bad they didn't also teach you to be a little more humble and considerate.

For those adults who tried to help me, I do appreciate it, no matter how "cute" some people think that appreciation is. I actually had a co-worker who is very experienced at PLCs teach me how to assign the bits to the different inputs and outputs in the circuit (or vice versa, I'm still certainly no expert at it). I guess it was easier to explain my question and the answer in person rather than typing it up. It's a shame how one rude person can leave such a bad impression.
 
Honestly I don't even know enough about it to know if I understand your question. The exercises that go with the LogixPro simulator explained how to find the data tables. So, if I understand your question, I knew how to access the table and see the bits, I just didn't understand how to (for example) connect bit B3:0/0 to the "motor up" output. How to make those kinds of connections was what I couldn't figure out, and maybe I'm still not explaining it clearly. And again, I realize that just because I was shown one way to do it in one scenario doesn't mean I'm an expert, but it allowed me to work my way through the exercise and learn a little bit about that function while getting at least a little bit of experience with it in an introductory setting, which I think was the point of the exercise.

Lol, I said a "little bit"...... I'm punny.
 

Similar Topics

So Friday is my last day at my current job. Though I'm exploring contract work and looking at employment from other companies, I'm also going to...
Replies
2
Views
2,222
Any Guide, Ebook, Tutorial Appreciate on where and how can i learn STL ? Thanks
Replies
5
Views
2,349
Hi, I have most of the basics down for the instructions of PLCS but I need to learn how to write programs from flow charts using the transition...
Replies
11
Views
3,092
I am seeing this term "galvanic isolation" I remember in early 70's when the magic marketing phrase was "electronically controlled". Is this...
Replies
9
Views
4,884
I received an email from a student with the following code attached. This is supposed to control a floodgate system, and supposed to be written...
Replies
23
Views
782
Back
Top Bottom