Programing Question

Niese

Member
Join Date
Apr 2018
Location
Ohio
Posts
4
Hello Everyone,

To get started I am a Mech. Engineer and am trying to self-teach myself how to program for a home project. That being said I don’t have a lot of examples to go by and I am hoping that my question is easy and is just something I haven't seen or know to try yet. That being said I will try and explain the best I can. Basically I have two sensors and a solenoid valve controlling a hydraulic motor. When sensor one sees its flag I am turning the hydraulic motor on until it rotates enough for sensor two sees its flag. The problem I run into is that the flag for sensor 1 is mechanically driven based on ground speed. If I happen to be going too slow or stop and that flag is still in front of the sensor, as the plc continues to cycle and it "sees" that this flag is made and continues to rotate the motor. Is there a way to program this so that sensor one has to reset itself, as in it has to turn off(not see the flag) and then see the flag again before the motor is allowed to rotate and index the flag for sensor two again?

As you can see in the attachment I have tried using a drum for this. Sensor one is "1 unit count" and sensor two is "1 cup count". I tried adding a timer in step one to give the flag time to move off of sensor one. This only works so well though and I am not happy with how it works.

I have tried a bunch of different methods including not using a drum sequencer and just cannot seem to wrap my head around this. If anyone has the time to hold my hand through this it would be greatly appreciated.

Thanks,

Derek

*Edit* Also I should note I am using a Productivity 2000 plc from automation direct for this project.

drum sequence.jpg
 
Need more info

Tell us more about the process.

what are you actually trying to do.? (physically)
what sensors are you using?

Drum sequencer is probably overkill for this application, it COULD work bit I'm guessing its not needed.

I would GUESS that adding a one-shot to the sensor input would fix your problem but its just a guess, need some more info.


-Ghost
 
GhostPepper,

Physically, all I am trying to do is see a flag attached to a wheel. As the flag goes around when I sense it I have a small hydraulic motor with its own flag attached to the output shaft. I am trying to index the motor one revolution at a time, start/stop. One revolution of the hydraulic motor every time I see the flag on the wheel. My big problem is I cannot figure out how to program this so that if the wheel stops with the flag in front of the sensor, that the motor only goes around once. Currently the motor just stays running, I am assuming because the plc continues to scan and "sees" the flag on the wheel so it thinks it needs to keep moving the motor. I just cant figure out for the life of me how to make the wheel sensor see the flag once, then wait until the flag moves off of it and comes back around before it lets the motor index again. This whole project really has no end game, I have just been using it (and a bunch of random parts laying around) as a training exercise.

As far as the sensor I am using, it is a automation direct and the description is as follows "AE1-AN-4F Inductive proximity sensor, 8 mm diameter, 50 mm body length, tubular, NPN, 4 mm nominal sensing distance, unshielded, N.O. output, 3-pin M8 quick-disconnect, nickel-plated brass housing."

Again if you could just point me in the right direction I feel like that would get my mind churning on this. Could you explain one-shot alittle more?

Thanks,

Niese
 
Ons

I have never used any automation direct products so other forum members may be more help but I would be surprised if the one-shot was any different than in controllogix that I am using.

A one-Shot will go true every time its input TRANSITIONS from false to true. but only just for one scan, it wont stay on until the next transition.

I would try putting a one-shot on the input of each of your sensors so that they are only giving you a pulse when they FIRST detect the flag on the wheel or the motor.

then I would use these outputs to seal/break the seal of your motor running coil.



-Ghost
 
Some Reading material

you could give the below links a good read, it covers some of the things you will need. probably should read up the rest of the site too, as its for Automation direct PLCs. think its for the Do-More but maybe the productivity is the same? someone else can probably help to convert.

Your instruction is in here:
http://accautomation.ca/productivity-1000-series-plc-contact-and-coil-instructions/

one-shot are talked about here:
http://accautomation.ca/how-to-make-a-one-shot-in-the-plc/



probably would TRY something like the attached. it assumes a lot about your setup like spring return valve and some other stuff. might be a starting point.

FlagDetect.jpg
 
Could you explain one-shot alittle more?

I don't know much about the Automation Direct products specifically. That said, some general background:


"One Shot" is the Rockwell term; they are also commonly called "edge triggers" or "edge detection" in other brands. It is an instruction that compares the current value of something to the value last scan. If (and only if) the current value is true and the previous value is false, then the instruction is true for one scan. It is common to have a few different versions of this comparing one tag vs the ladder status, and rising edge vs falling edge.
 
Niese,

if I understand you.
Sensor 1 - ok to run hydraulic motor by turning on valve.
sensor 2 - cup detected - does this stop the hydraulic motor?

I do not know your process, but I did something similar several years ago.
may I suggest the following.
1. look at the operation of your line in front of this equipment.
what tells the line to start?
what tells the line to stop?

2. write down the line process in front of your equipment in detail, forget the I/o. include the start / stop actions

3. now add in your hydraulic system.
what would tell your system to run?
what would tell your system to stop?

so when we do this, we get the following.
1. permission - is everything powered up and at the home position so that the hydraulic system can run (including your system)? yes - goto step 2
2. enabled - has the line been told to run? yes - step 3

here is where I am going by what I did.
3. has sensor 1 been made, yes - small timer to make sure sensor is really there.
4. command - set a run command bit to run the hydraulic motor.
the hydraulic motor then runs until what ???? the line stops if I understand things correctly. if the line is told to stop, turn off the valve and keep the run command bit on.
5. when the line starts back up, the valve is energized and the motor keeps going.

past this point, you need to tell the logic what stops the hydraulic motor
and resets the run command bit.

you will need to see 3 pictures in the future.
1. mechanical picture - how the mechanics work
2. plc side - what sensors, pushbuttons, devices are required on the mechanics so that the plc can do its job?
3. marrying the mechanics to the plc controls.
just because you can design a machine and know that is works DOES NOT, I repeat DOES NOT mean that the plc programmer can make it work !!
The mechanism may not allow a sensor to be mounted on a cylinder. a photo cell or prox switch may need to be located somewhere so that the next step can take place.

you MUST work with the programmer and listen to what he says and why he says some sensor needs to be added. Think about the pneumatic valves in the design. what happens when you loose power, his the e-stop.

NEVER, ever program a machine that runs strictly on timers, flow controls, and air pressure. you are doomed from the start. Trash / water in the air lines, some one speeds / slows down flow controls, air pressure changes. it just won't work.

long winded, but as a mechanical engineer, you need to know this up front.

hope this helps,

james
 
Thank you everyone for the help and examples. I was able to use the single shot examples and build it into my program. It took me awhile but now know and should be able to apply it in the future.


Thanks again,

Niese
 

Similar Topics

which program can i use in logo plc to for automatic switching single phase from three phase when line one fails
Replies
2
Views
1,772
Hello, I have a GE Versamax plc and am using versapro software. I was wondering if there is a way to have a selector switch control 2 seperate...
Replies
5
Views
4,956
Hello, I have Guard PLC 1600 by Rockwell Automation (it has been obsolete by them but still in the market and works fine). I need know if this...
Replies
9
Views
1,212
I got DL06 AutomationDirect PLC to program with DirectSOFT6. It is a simple machine (40 in and 20 out, all digital), few valves, a simple conveyor...
Replies
23
Views
6,843
Please suggest me programing cable for omron plc sysmac model no. Cpm2a
Replies
1
Views
1,122
Back
Top Bottom