Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Need input on SLC500 Prog

Status
Not open for further replies.

TRWServices

Computer
Sep 10, 2005
4
0
0
US
I have an application where I need to add a cylinder that constantly goes back and forth to divert product, but uses no prox switches, only time base.
I thought about just using a timer then latching and unlatching it with a second timer, each done bit firing opposing sides of the cylinder air feed.
But for some reason I'm having a brain fart and keep confusing myself. Can anyone suggest a better way of programming this logic?

Dazed and Confused
 
Replies continue below

Recommended for you

Use not dn of timer 2 to drive input of timer 1. Use dn of timer 1 to drive input of timer 2. Use not dn of timer 1 to extend cylinder and dn of timer 1 to retact cylinder.

 
Essentially you use one timer and two sequencers, an SQO and SQC. You can use the found bit of the SQC to drive the SQO. Internally the SQ0 could have a word's bit stream that looks at a timer's done bit. Then the "~EN control bit" could drive the SQC which can control the cylinder's return from the SQC control file. A little too computationally expensive for such a simple problem.

msward's concept of using two timers is better for a simple operation, but sequencers are interesting.

Using the "handshaking" of the SQo/SQC is pretty interesting for more complex and modular mechanims. If you had a line with three or for machines, each machine could have its own SQO/SQC pair. If the machines were shifted arround in some way or used on another line, its minimal coding. You just got to document the word's bit stream somewhere.

 
You could also use a free running timer and a bit from the ACC value.

For example assumng you want one second on and one off you would set up a timer with a 1.0 sec time base then an XIC T4:xxx/0 for one position and XIO T4:xxx/0 for the other.

For 2 secs you would use bit 1, 4 secs bit 2.

If you need some othet value set the time base to .01 and look at the acc value in binary radix and pick your bit.
 
first off we need to know the hardware.
Is the cylinder single acting or double acting. i f single acting (spring return) you will need a single solenoid valve with sping return. I f using a double acting cylinder you will need a dual solenoid valve.
If you are using a single acting cylinder you do not need to write a sequencer a simple flasher program will do.
just use two timers like this.
timer 1 turns on when timer two done bit is off.
Timer 2 turns on when timer 1 done bit is off.
Use the timer 1 off bit to turn on the output to the solenoid. To control the time on and time off adjust the preset time of the two timers.

If the cylinder is double acting and uses a dual sloenoid valve you will need to employ a sequencer.

best regards, plcsavvy
 
Oops I made a mistake. Timer 2 turns on when timer 1 done bit is on. Sorry for the confusion.
Use the normally closed timer 1 done bit to turn on the output to the solenoid.

best regards, PLCSAVVY
 
You do not need to have two timers. Use one TON timer, set to the complete cycle time. In its enable input place a XIO (NC) contact with the timer done bit. This will create a free running clock with the desired cycle time.

Then using a compare instruction, can be either GRT or LES, compre the accumulator value to the desired setpoint. For example, using a LES instruction, compare the timer accumulator to a value 1/2 the cycle time. The output of the compare is connected to the output bit. When the timer is reset, the output will be activated. As the the value in the accumulator passes the half way point, the output will be turned off. You can trigger multiple outputs off of the same timer with multiple setpoints in this manner.
 
Status
Not open for further replies.
Back
Top