Zombie Box

Join Date
Oct 2012
Location
canada
Posts
4
i am very new to the PLC world! i bought an Omron cp1L PLC and it uses CX Programmer. i made a wood box for Halloween that has a air cylinder in it that I want to hit the lid to make it look like someone is trying to get out. So....

i think that this should be done with a series of timers to turn on and off the output very quickly. i have tried but am having no luck with the timers because i am not educated enough and dont full understand. is there anyone that can help.

Thx
JR
 
You will have to cascade some timers (maybe counters too).

I got a small example that should knock twice, then three times a bit faster.
 
Last edited:
this is great but it looks like Allen Bradley and i need it to be done in the cx programmer. i dont understand how the timers work with the Omron. there is no DN bit for the Omron timers or i just cant understand how to use them.
 
Tharon, since plcbeginner2012 is new, you should point out that your pdf is written for Allen Bradley. The principles should be the same (I don't know) but it is likely that the syntax will vary.

Worry, not, beginner, for there are Omron gurus here, likely to chime in.

I would code this with cascading timers, and perhaps a range of random numbers popped into one or more of them so it is not too patterned, and more realistic.

Hopefully a youtube link will eventually append this thread, this sounds like a fun one.
 
Sorry, I was in a bit of a rush to get out and do some work before the sun set.

I knew he was using a non AB controller, which is why I stuck to using the "Done" bits from the timer and counter. Rather than special bits like Accumulating, comparing values, or "Timer Timing" bits. My experience with Omron before had been pretty positive and the basics of the ladder seemed relatively close the RSLogix. I was hoping the example would show how to use a pair of timers to create a loop in ladder logic, by turning one on when the other was done, and resetting the first when the second was done.

The example posted in RSLogix mainly just cause that was all had installed on my home computer.

Edit:
I thought there was a "Done" bit in Omron? Maybe not labeled actually "Done" or "DN" like in AB... but I thought it existed. Maybe just addressing the timer directly on the NO or NC input instruction? Again, my Omron experience is limited, but I remember it being very similar to AB in terms of how the ladder was laid out.
 
Last edited:
I made a wood box for Halloween that has a air cylinder in it that I want to hit the lid to make it look like someone is trying to get out.
As Iant shows, use the Omron T0001 timer bit (with is set in the timer block) to control your air cylinder solenoid.

As Tharons logic does, use a second timer to control the durartion of the activation. Timer 1 sets the time between activations, and Timer 2 sets how long the solenoid is ON. You could use Pseudo-Random Number Generator PLC logic to control the two timer settings (within a certain Min-Max range), so that the lid bumps appear to be the result of random attempts to get out.

You should attach rubber or elastic hold-down cords to the underside of the lid, so that it appears to be resisting the efforts to open, and will open only a few inches as the cylinder pushes up. Instead of a box, use a metal casket shell. Your local casket manufacturer will have several rejects (dents or paint defects) that you can buy cheap, maybe even a slightly used one that was returned! I once got one donated free to use for a soap-box derby car. We had to shorten it to meet the size restrictions, and move the lid hinges to allow room for the front wheel supports.

DSC01633 Casket Car with Lid Raised.JPG
 
Last edited:
The done bit is just a normally open contact with the timer number - eg T0000 for timer 0.
You could also look at using the inbuilt clock pulses - 0.5 second on/off is CF102 for example but these are not adjustable.
Here is a simple 2 timer circuit - done with the first card being a 16 bit input card and the second a 16 bit output card.

Knock Timer.jpg
 
thx

i thank you for all your help and Bob this is what i needed. it works. not randomly but atleast for halloween it will open and close. thx again for all your help. i also built a coffin will post pics after halloween. thx again.

JR
 
Here is a quick and dirty random one for you - uses an inbuilt free running timer - a mask - and data memories for the set point - a bit fancy and you may learn a thing or two from this one.
Check the use of ANDW (mask I use it for here) and auxiliary area A1 in the manual - there are heaps of things you can use for all sorts of things.
You will have to go to you PLC in the work window, right click, select properties and tick 'Execute Timer/Counter As Binary' - CX-P will then 'convert' the program.
Then enter the code - TIM is a BCD timer - TIMX is a binary timer - you have to change the timer/counter type first or you will get an error.
No symbols or anything this time - you will get the idea. Stick it in the simulator and watch it work - right click on the output and select differential monitor when the simulator is running and you can see when it really turns on and off - the pretty green lines are way too slow to pick everything up.
By the way, the first output for the CP1L is 100.00 - I set this up for a CJ1M - same instruction set pretty much - different I/O allocation.

Knock Timer 2.jpg
 
Last edited:
Here is a quick and dirty random one for you - uses an inbuilt free running timer -

That is how I have gotten pseudo random numbers. Grab the free running clock and swap some of the low bits with the high bits, divide by the range to a floating point address, and now you have a pseudo random number from 0.0 to <1.000...

I like to swap the high bits (excluding the sign bits) with the middle to low bits, then DIV it by the range stored to a Float, so that, if, for example: I need a random number for five subsequent clock cycles, they don't become just increments. I don't want them all together if I call for random. I have only had one use for random numbers, and it was not that demanding, but this is one of those original methods from my first expressions in computer programming.

This becomes a multiplier easy to apply to the calling program.

It works well if you intentionally seed it with an unpredictable event or one that is known to vary widely. By seed it, I mean an offset, store the free running clock at that even and then subtract it from the real one in your randomizer logic.

This is exactly the same way I rolled my own random numbers in assembly language in the Atari days. Then I had to hand convert it from hex to decimal, POKE it in with Basic, and hope it didn't freeze the thing up at runtime and cost me another 30 minutes of wasted time reloading from audio cassette.



It also helps if the calling function doesn't fall into exactly timed patterns that make the results repeatable.
 
Last edited:
As a newbie I use programs such as the one in this thread and put in LogixPro to understand how it works. So if I wanted to see my "knock solenoid" knock faster all I have to do is decreased the presets, right! There was an explanation on how to do a random by Lancie
You could use Pseudo-Random Number Generator PLC logic to control the two timer settings (within a certain Min-Max range), so that the lid bumps appear to be the result of random attempts to get out
How would it be using LogixPro and RsLogix?
Eventually I will be uploading the program on my ML1000 and using the coil of a small contactor (for the knocking noise) until I can find a push-pull solenoid (like a laundry solenoid)to do my own zombie box for next year..But meanwhile still learning from you guys.
 
How would it be using LogixPro and RsLogix?
I will work on it and post a LogixPro program here tonight. How do you want your version to work? Like PLCBeginner's:

I think that this should be done with a series of timers to turn on and off the output very quickly.

Or like Tharon's excellent program with 2 steps and 2 sets of varying knocks, or like Pauls' with random knocks with random ON time periods?

What about always having 3 knocks, with varying times between knocks and varying ON solenoid times to vary the force of the knocks? It it logical that any respectable zombie wanting out would pound or push about 3 times before giving up and resting?
 
Last edited:
Yes, you can convert this LogixPro program easily to your Mircologix1000. Just change the Input and Output addresses to match your I/O, and adjust the timer time base from 0.1 seconds to 0.01. This version varies the time between knock cycles from 5 to 15 seconds, and varies the knock duration and time between 3 knocks from 0.5 to 1.5 seconds. It produces 3 knocks at random times that vary from soft fast knocks to loud long knocks. Do you need help to convert it to RSLogix500 (you will need to adjust the times generated by the RNG to use the 0.01 time base available in RSLogix)?
 
Last edited:

Similar Topics

So this is my attempt at collecting and displaying data on a Cmore panel With a DL06. Each pair in my logic is the "Time total" or the TA15 and...
Replies
4
Views
482
Possible dumb question here, but how does running a motor through a gearbox effect a VFDs ability to limit the torque on the driven load? My gut...
Replies
2
Views
530
i have a dell laptop with a real com port host OS is windows 10. Running VB 6.1.42 I cannot get the serial port to configure in VB. Please Help...
Replies
10
Views
1,043
I've just created a small program and saved it. Then I clicked on the 'Download to device' icon and this dialogue box appeared. Do I need to...
Replies
20
Views
1,441
Hi guys, I'm a beginner in this field, but i have knowledge on IT i want to give a help to my best friend for his SIMATIC Microbox PC that he...
Replies
4
Views
1,099
Back
Top Bottom