Pointer Question

mastabfly1

Member
Join Date
Jun 2005
Posts
11
Hi all,
I am working on a project with my internship.

My project is that I have 11 red push buttons, 11 blue push buttons and 11 yellow lamps. Within red push button/blue push buttons/yellow lamps I have to figure out to how to put them in order if they were to go off simultaneously. But now if two different kinds of push buttons were to go off at the same time, I have to put them in orderot let's say if a red push button and blue push button were pressed and a yellow push button were to go off all at the same time I have to have a output that goes in the order of red push button, blue push button, and yellow lamp. I was thinking that I can make a 3 temp variable by "or"ing all the red buttons, all the blue buttons and all the yellow buttons. Then put them into a FIFO table but I don't know how to intialize pointers so can you give me an example of intializing pointers, I looked in the manual and it did not make sense to me at all.

Also, is there any other good suggestions that I might try?

Thanks
 
Just me...

But your description is not really all that clear on what you are trying to accomplish. Also, I would say it apears that a FIFO is definately needed, but give us a better idea of what you are trying to do here and we can go from there...

PS. If you want help show your work... and example of some type... đź“š
 
So lets get this wright! you have 11 red push buttons and 11 blue push buttons
11 yellow lamps

so are you saying the red and blue push are illuminated as well or they just a straight forward n/o contact switch! are they momontarly or maintained switches ?

What are you trying to achieve?

what does the example represent?

need more info jonny five alive LOL!
 
mastabfly1 said:
Hi all,
.....I don't know how to intialize pointers so can you give me an example of intializing pointers, I looked in the manual and it did not make sense to me at all.

Also, is there any other good suggestions that I might try?

Thanks


Pointers is also refered to as indirect addressing. There's an instruction that will retreave data from the memory value in the pointer (the pointer is just another memory location).

You didnt mention the PLC so I cant provide what the pointer instruction is.. but it works like this:

Some other part of your program code may be indexing the pointer value when necessary. For example if your filling a data table, the program might add a 1 to the current pointer value. The value in the pointer is acutally the address that you want to retreave some other data from, or write data to. The pointer addressing instuction would then be executed in your code to retreave or write data to the address that the pointer value represents.

If you provide more info, such as PLC type and model CPU etc... You'd get more spicific answerers.
 
Okay to clear this up

I have 11 red push buttons, 11 blue push buttons, and 11 yellow lamps. If any of them go off I have to e-mail a boss. Right now I am having problem with a case, what if 2 red PB's, 3 blue PB's and 1 yellow PB go off at exactly the same time. We have to delay the e-mail message somehow because 6 e-mail messages can not be sent at the sametime. But there are priorities, if red push button is pushed the email message has to be sent immediately, then blue pb then yellow lamp. Samething goes with the case if there are more things goin on at the same time.

I think I want to use FIFO but I am not too familiar with pointers so I need an example how to use them.

But if there is a better way to do it I would like to know.

I am using Mitsubishi A-series PLC
Thanks
 
Last edited:
Again, not real clear...

mastabfly1 said:
I have 11 red push buttons, 11 blue push buttons, and 11 yellow lamps. If any of them go off I have to e-mail a boss. Right now I am having problem with a case, what if 2 red PB's, 3 blue PB's and 1 yellow PB go off at exactly the same time.
Now, which is it...?

And also, you stated that the yellow Lamps/PB would activate with a blue button only? So how would you have 2 reds, 3 blues and only 1 yellow? I think you are making this way too complicated...

Sound like the e-mail is only triggered by the red buttons, and the blue buttons only trigger its appropriate yellow light/PB, is that correct?
 
When any event (X) happens, latch that occurrence in its own bit.

Now have a section of logic which looks at each latched bit one at a time.

In a seperate rung for each possible occurance, if a global 'send email' bit is not currently set and the latched bit (X) for the occurance is on then set the 'send email' bit. Also set a 'sending email(X)' which is specific to this event, and finally set up any information required for this email to be sent.

After processing all these rungs if the 'send email' bit is on have the logic which will send the appropriate email with such logic as necessary to prevent multiple sending of the email for the same event. Then if it is possible to sense that the email is sent the turn off the 'send email' bit.

Now have another set of rungs, one for each occurance. If the latched occurance is on, the occurance specific 'sending email' is on but the 'send email' is off then unlatch the occurance specific latch and its 'sending email(X)' bit.

This way the emails will be sent in the order of the rungs. Place the higest priority occurance first in each of these sets.
 
So are you generateing the e mails from the PLC direct or are you useing a HMI? Haven't had anything to do with that kind of e mail stuff yet but i sure when i looked into it to it on one project i was working on involveing a Amonia plant i was led to believe that the handling of the e mails could be done within the HMI (E700) and we were going to use mits Q series What the hell just put a fully funtional SCADA system on there and be done with it you be able to look at the whole plant from your remote PC and take action if needed raise all sorts of alarms day and night take a bit of time to set up to start with but hey once your up and running it will just grow and grow technology aint it great
 
red push button, blue push button and yellow push buttons are 3 different inputs. If any one of them would be activated an e-mail is sent to a boss.
 
mastabfly1,

Empty your mind, be formless. Shapeless, like water. If you put water
into
a cup, it becomes the cup. You put water into a bottle and it becomes
the
bottle. You put it in a teapot it becomes the teapot. Now, water can
flow
or it can crash. Be water my friend. – Bruce Lee, 1940-1973,
American-born
Martial Artist and Actor
 
You put water into the PLC it becomes a firework

you tell the boss you hosed the plc you get the sack

and then the water magicly re apears out your girlfriends eyes

and the water carries on its journey
 
mastabfly1 said:
red push button, blue push button and yellow push buttons are 3 different inputs. If any one of them would be activated an e-mail is sent to a boss.

The way I would prefer to do it is to use outputs in my program that would directly map themselves into a register. This would effectively OR these outputs together (you had the right idea).

Do this for each group of inputs using three registers, check for a non-zero state, if true send out e-mail.


I am using MITSUBISHI MELSEC-A

Zoom-zoom.

That's about all I know about Mitsi's


Good luck,
John


(at least I didn't bring up Bruce Lee until the very end).
 
alright lets try this again, i have tried to explain it the best way i could possibly could.

PROBLEM:

There are three inputs: Down Push Button, Call Push Button, and Waiting Down Lamp.

Each of them have 11 of each.



Priorities go like this:

Down Push Button

Call Push Button

Waiting Down Lamp





For Waiting Down Lamp, after 15 minutes a supervisor (supervisor #1) is e-mailed, after 30 minutes another supervisor (supervisor #2) is e-mailed.

As for the down push buttons, when the button is pushed e-mail is sent immediately to maintenance and supervisor #1.

On the other hand for the call push buttons, when the button is pushed e-mail is sent to supervisor #1.



Assuming that all the push buttons can be categorized in the same category, there are three major categories:

15 minutes e-mail send

30 minutes e-mail send

Push Buttons e-mail send



Now this changes things a bit. It changes the priorities:

1. Push Buttons e-mail send

2. 15 minutes e-mail send

3. 30 minutes e-mail send



In conclusion, to sum it there are three categories and two sub-categories and below they will be listed in the order of priority and order

which the e-mail will be sent when there are simultaneous events occurring:



I. Push Buttons

A. down Push Button e-mail

B. call Push Button e-mail

II. Waiting down Lamp

A. 30 minutes e-mail send

B. 15 minutes e-mail send



For example, if a down push button e-mail, 15 minutes e-mail, call push-button e-mail, and 30-minutes e-mail were to generate the same time

the order that will go in is down push button, call push button, 30-minute e-mail, then 15 minute-email.



What I have to do is to using MITSUBISHI MELSEC-A program so that send command is not generated simultaneously, and no important e-mails are lost. Further more, it is important to have pending e-mails located in the correct position and sent to the correct person.



APPROACH:

To solve the problem three major things need to be taken into account:

1. Two of the same categories generated at the same time.

2. If the two or three of the different categories are generated

3. 1 and 2 happens at the same time.
 

Similar Topics

Hello Folks! I'm still trying to get the hang of using STL and Pointers in Step 7 (V5.5). For background, I'm writing a sample application...
Replies
7
Views
3,279
Can you help me with "generating" pointers? I have INT variable and I want to create pointer based on variable's value. For example var=30 =>...
Replies
2
Views
1,691
Hi, i've came across this code: AN #STATUS.R_REQ AN #STATUS.R_BUSY S #STATUS.R_REQ CALL "RDSYSST" REQ...
Replies
9
Views
2,257
I need a bit of help with pointers in S7. I am a AB and Omron person who has done some simple S7 programming before (but I have avoided STL...
Replies
16
Views
12,511
Have a little question how to do this: I want to do a ANY pointer wich gets a DBnr (INT) and number of bytes to send and number of bytes to send...
Replies
6
Views
2,050
Back
Top Bottom