Can you recommend the proper direction on SLC500

Yes, I see Bernie reference the words double coil and I searched on that. I see my sins. I dont understand the parallel thing however. I will read some more.

Let's take your posted example. Just from the rungs that I can see (there may be more) you are wanting O:1/3 to come on whenever B3:0/2 is true OR B3:0/3 is true. So, instead of the two rungs with OTE O:1/3, create a single rung that has XIC B3:0/2 with a parallel branch around the XIC and on that branch XIC B3:0/3. Then the output is only OTE O:1/3.

-{XIC B3:0/2)-|------(OTE O:1/3)
ccccccccccccc|
ccccccccccccc|
-(XIC B3:0/3)-|

Note the c's are just for formatting on here - would be blank

In YOUR program you would just have as many parallel branches down as you needed for all the OR conditions that turn on O:1/3. If you have more than two, a handy tip. Don't keep creating new branches as they'll look ugly and will stairstep. Instead, righclick on the branch and select extend branch down to add another level.
 
Last edited:
As Robertmee was trying to point out think in terms of the outputs.

Put the computer aside and drag out some paper. Undoubtedly you have reduced a given input from the HMI to a pair of outputs. Now you have to take all that data and work backwards. Make a list of all the outputs one at a time. Now, for each HMI Bit, write its address next to the two outputs you want to turn on. If you are keeping your 64 button 8x8 matrix approach you would have eight entries for each of your 16 outputs.

As an example, here's a partial list from your image:

Output - Triggered by

O:1/8 - B3:0/0 B3:0/2
O:1/9 - B3:0/0 B3:0/1
O:1/12 - B3:0/1 B3:0/3
O:0/3 - B3:0/2 B3:0/3

Now, you will make 16 rungs. This is the procedure.

Take your first output with all of its triggering HMI bits.


Place an XIC (normally open) of the first HMI bit at the left side of the rung. Place the OTE (Output enable) for the output location toward the right side.

Now, right-click on the HMI bit on the left. Choose 'Insert New Branch'. An empty branch shows up to the left of the contact. Click on the right side of the new branch and drag it to the right side of the contact. As you drag a red rectangle will appear to the right of the contact, As you approach it closer it will turn green. At that point you may release the mouse button.

Now on the bottom left corner of this empty branch, right click an select 'append instruction'. The instruction you select will be another XIC. Its address will be the second in your list of HMI bits for this particular output.

Again on the bottom left corner of the added branch right click and select 'extend branch down'. Now on the bottom left of the now added branch repeat the above 'append instruction' to add the third HMI bit for this output.

Continue with the 'extend branch down' and 'append instruction' until all the HMI bits which trigger this particular output are entered. When done you have one of your 16 rungs. The others will be basically the same in appearance.

I hope this helps.
 
Sweet Bernie.. I took a excel spreadsheet and work up the whole new model of the outputs and the X's Y's .. label's .. I can sort now and keep it all straight. I have 4 completed rungs and all appears to work right now.

I started a new RSS file completely and of course. That communication thing will bite you. If a plant had 25 of these PLC's, I sure hope they all are 100% exactly the same, because if not someone better be keeping some really good documentation.

thank you once again Bernie.
 
OK.. that is complete. Cant thank you enough for the kindness in helping me with the logic.

Now what type of rung do I construct for macro commands? This is like I want to put together one output after the other on a one button type deal.

Like this> Get Tool 1 . I would need to X0Y0 X1Y1 X2Y2 X3Y3 X4Y4 X5Y5 ....

11 key strokes.

So, I am thinking this rung arrangement I have now is not going to do that.
The button would equal this >

B3:1/1 > spacebar spacebar spacebar MD Enter (pause) M6T1 Enter

2 relays on at a time with about 10ms delay maybe between outputs except the pause and this needs to be about 500ms.
The spacebar is necessary to get the machine on a command prompt screen. Once on the command prompt then the simple entering of text and enter key.

This all might be too far out there for ladder logic, but its just outputs, so surely it can be done.
 
OK, I have been reading on a possible approach to my macro commands. Its about flow and then output to me. Sequencer. Been reading Hugh Jacks nice 846 page PDF. Seems to me like I would store the outputs, and then release them one at time one after the other.
 
I found this looking at christmas light sequencing . No way its going to work like it is, but how can I get the output pairs in groups of one after the other?

abtimerreset.jpg
 
OK now you're really getting deep. You'll also have to consider if an operator begins a macro sequence then, while it's executing, hits another key on the screen. You'll have to somehow prevent that from triggering an output until after the macro sequence is done.

Is this, the macro sequence thing, a capability that you have thought up that isn't already present or is it something the system already does with the normal keyboard? If it already existed the normal keyboard wouldn't 'do' the macro sequence. It would have sent the normal keycode to the processor and IT would have done the sequence. The same thing with the toggling.

I'd say worry about getting all the key presses mapped correctly. I think the toggling and macro sequences, if they existed before, will all still be there.

All the 'M code' and 'G code' stuff should be in the processor. Or are you going to totally replace the processor also and just make a CNC out of the PLC?
 
What you need to create is a sequencer. Pre PLC these were called Drums and were similar to a music box and the way it plays notes. Think of the spool on a music box. As it turns, the tits lift the tines and notes are played. This was translated to the industrial world with Drums. Then PLCs came along alot of them too had drum and sequencer instructions. However, nowadays, most people just build their own following a step/transistion methodology.

An easy way to do this is to use B3 bits to latch/unlatch steps. At any given time you'll be in one step and based on being in that step you'll execute your outputs. To get from one step to the next, will be your conditional logic, in this case your 500 ms delay.

So, let's say B3:1/0 to B3:1/15 represent 16 steps.

Anytime, one of those bits is on (the others will be off), that represents the step you are in. So, when B3:1/0 is on, you are in step 0 (the first step). When you are done being in step 0, B3:1/0 will turn off and B3:1/1 will turn on, indicating you are now in step 1.

So, how to construct...Easy.

First, you'll need one rung to reset everything to step 0. I don't know your process well enough to know what this is, but make a rung with the condition you need. The output of this rung will be a CLR B3:1 (clears all the B3:1 bits in that word) and in parallel branch to that, use an OTL (NOT OTE) of B3:1/0. Now, all the B3:1 bits are clear except for B3:1/0 which is on indicating you are in step 0. You only need to do this one time, like on power up of the PLC (use the first scan bit), or if you have a master reset condition.

Okay, now how to step through. You'll create the number of rungs you need for the number of steps. Each rung will be very similiar. It is:

XIC Step x - CONDITIONS to STEP - OTL Step x+1 parallel branch OTU Step x

Let's take step 0 to step 1. The code would be:

XIC B3:1/0 - your condition to start - OTL B3:1/1 parallel OTU B3:1/0

See, if you are in step 0 and the condition happens to leave step 0 to go to step 1, step 1 bit is set and step 0 bit is turned off.

The next step rung would be:

XIC B3:1/1 - your condition to go to step 2 - OTL B3:1/2 parallel OTU B3:1/1

Now you've stepped from Step 1 to Step 2.

Keep repeating until you are done and want to go back to step 0. Let's say you only have step 0 to step 8. The last rung would be:

XIC B3:1/8 - condition to end and go back to step 0 - OTL B3:1/0 parallel OTU B3:1/8.

Now, you're stepping routine is complete. To actually turn on the outputs you need, go to your existing matrix logic, just add more extended branches and add an XIC of the B3:1/x for the step that should turn on that output.

And particular to your request, your condition from step to step is 500ms. So, you just create a rung with a TON based on being in that step. You use the .DN of that timer as the condition in your stepping routine. For example, 500ms delay between step 1 and step 2.

Create a rung XIC B3:1/1 (step 1) TON T4:5 500ms

Your step logic from 1 to 2 as above is

XIC B3:1/1 XIC T4:5.DN OTL B3:1/2 Parallel OTU B3:1/1

See how well that works and it is easily understandable. And from troubleshooting you can look at the B3:1 word in the data table and know exactly what step you are in at any given time.

Also, understand that as you step out of one step and into the other if you need to maintain outputs on based on being in multiple steps, you again just simply add those steps to your existing OTE output instructions. Let's say that you want the output to come on in Step 1 and stay on until Step 3. Then for that output, you would have XIC's of B3:1/1, B3:1/2 and B3:1/3 in parallel branches as Bernie explained.
 
OK now you're really getting deep. You'll also have to consider if an operator begins a macro sequence then, while it's executing, hits another key on the screen. You'll have to somehow prevent that from triggering an output until after the macro sequence is done.

Is this, the macro sequence thing, a capability that you have thought up that isn't already present or is it something the system already does with the normal keyboard? If it already existed the normal keyboard wouldn't 'do' the macro sequence. It would have sent the normal keycode to the processor and IT would have done the sequence. The same thing with the toggling.

I'd say worry about getting all the key presses mapped correctly. I think the toggling and macro sequences, if they existed before, will all still be there.

All the 'M code' and 'G code' stuff should be in the processor. Or are you going to totally replace the processor also and just make a CNC out of the PLC?

I am not 'ready' to make a CNC out of a PLC yet in life, but one day I hope to. I already have the Galil cards, AMD drives, axis motors, and other stuff.

The macros is something I have thought up to do with this new found way of controlling a 286SX computer.

I have already mapped and done the whole keyboard deal. it all works 100%.

I have a way of getting to the command prompt now by default. I can set a parameter in the CPU of the machine to stop at the command prompt with 3 space bar pushes. Even if I pushed it 5 times, it still just sits at the command prompt. Emailed Fadal yesterday about this issue.

There is a hard button Estop on this machine. I have no intentions of removing the hard buttons in the pendant. I am only replacing the keyboard with this LCD touch panel, and enhancing the quality of the experience to stand there and run the machine.

My machine shop is behind my house. It is me myself and I that run it.
 
OK sorry for the misunderstanding. I'm glad the basic keyboard translation is working and that I may have given some help.

You're into an area of experimenting I'm not good at without the hardware in front of me. Good luck with your development.
 
OK sorry for the misunderstanding. I'm glad the basic keyboard translation is working and that I may have given some help.

You're into an area of experimenting I'm not good at without the hardware in front of me. Good luck with your development.

Bernie, I cant express my appreciation in words to this forum and people that have contributed to my own little personal project. Success comes in getting an end result, and that drives more learning. All I need is a little direction so I can read and study one specific area right now to get a end result of success and the 'feel' good factor. Man I love all those little lights on that OW16 popping on in the pairs with the push of a button. I took it out to the machine this morning and plugged in enough to test a few things and love it.

I have run some really nice 5 million dollar 5 axis machines and the quality of the experience in the hardware makes running that machine fun. I have my little ole $20,000 dollar 3 axis and I want to enhance that quality for me.

So, take a shot at all the ideas you want to. I will try them and see if it works or not. Safety in my workmanship and results is always on my mind guy, so dont fear something is going to kill me to try.
 
Hi all,

I did not have a very good day on the macros. I studied about 200 threads on sequencers, and never did understand the addressing part, and the set clear parts. Ok, I didnt understand much of anything about the traffic signal light changers, and the guy with the car wash coin op problem. Step to was not identified very well either.

I have attached my RSS and my CSV files. If you can just do one of the 11 step macros, I am smart enough to dupicate that setup for the other 15 tools. Then maybe I can figure out the other 4 - 5 commands I have in mind, but the tool change is important to me at least.

thanks
 
Last edited:
I created a ladder to show you a 5 step sequencer. A PB initiates the sequencer. First Scan or E-Stop condition initializes it. Each step stays on for 500 msec.

Now, based on what you need to happen in each step (which outputs to turn on), just use XIC of a step (eg B3:5/1) in your OTE logic.

Remember, only one OTE per instruction and that counts for all Ladders, so you can't be scanning multiple ladder files with the same OTE in them. It would be the same as if you had the OTE in one ladder.
 
Last edited:
Ok, I have the outputs figured out coming off the timers. It was working great until I setup the outputs that needed outputting in the exact same time.

I have the RSS attached.

I know what it is doing wrong, but i dont know how to describe it, and I dont know how to fix it. To me, the double coil is the answer, but reading all the posts about double coil, I know i cannot do that.

All 10 steps are in, and I see it really takes 11 steps so it is reset back to zero.

the logic is crazy in this program to me. I see however it is based on the old analog thought process and not a digital control process.

I see it as needing to do one step right after the other with no regard for the previous step, or a future step. However, this thing appears to care if you want X3 output on a rung, it goes ahead and lights up X3 everywhere else, not just on that one rung.

All 10 outputs are in the RSS file. All 10 timers. Just not working like it should.

Need some type of parallel deal like the way bernie had me do the other setup. I see how that would work however.
 
Last edited:
I got it working. But, it is not 100% right still of what it needs to do.

Attached is the new one with the Timers setup just like the structure bernie had recommended on the previous OW16 outputs so to avoid double coil.

However, what is happening now is the first 3 timers are not releasing when done for like 30ms would be fine. I need the same thing on another output where like O:1/14 is shared as the next energize and it does not release O:1/14 before going to the next timer.

So close now, I can taste victory coming with these marco commands. Help me with the release command. Most likely it needs a CLR command somehow to clear that timer output before going to the next timers. Humm, maybe another CLR up top in the ladder in the sequence structure?
 

Similar Topics

Good Morning , I have worked with many robot integrators through the years ,and was looking at Pearson Packaging Systems . Have many of you used...
Replies
4
Views
2,232
Hello PLCS.net! I'm about to program my first Robot soon! It's going to be a Fanuc. But wait, there's more! It's also going to be collaborative...
Replies
4
Views
3,391
I need to do some simple schematics, I don't need (and would never use) 3D modelling rendering etc. For those with long memories, AutoSketch would...
Replies
20
Views
8,543
Hello all, Is any good analyzing software. We have a bunch of data in text files. Need to analyse. Right now we are using DIadem. Is there any...
Replies
5
Views
2,301
Can someone recommend me a compact device to control logic on/off beacon according to signal from a PIR ? Some RTU maybe. I am newbie in...
Replies
6
Views
2,209
Back
Top Bottom