PLC (CP1L) Programming Help

iain545

Member
Join Date
Feb 2014
Location
Glasgow
Posts
2
Hi all.
New to this PLC programming so bear with me please.
I am using an OMRON SYSMAC CP1L plc with cx-programmer.
Needing a part of my program to allow one button to be used for 3 different functions.

Pressed once: Turns system on
Pressed twice: Turns half of system off
Pressed and help for 5 secs: Full stop

I can figure the rest out but it is just trying to make the program determine the difference between the first press and second. I can use a TIMER function for the 5 second hold section.

Any advice would be greatly appreciated.
Thank you.
 
Last edited:
iain545,

welcome to the forum.

it's been a long time since i did an omron, here is my suggestions.

rethink what you stated.
press a pb - first time - start the system.
press the same pb second time - turn off half the system
press the pb the third time and hold for 5 seconds system stop.

can you think of nothing that will count?
what about retain memory?

like, i said, its been a long time since i programmed an omron.

i hope these hints help.

post your work and we will offer suggestions.

regards,
james
 
I can figure the rest out but it is just trying to make the program determine the difference between the first press and second.
There is an old PLC logic function that does exactly that and has hung around here for years. It is referred to with various slang terms such as "toggle" and "flip-flop", but what it does is alternate between two functions each time a button is pressed. Search this site for "alternator" or "flip-flop".

Once you write about 1 or 2 rungs of logic for your alternator, you can easily add the third function as you said by merely adding a timer that looks at how long the button is pressed.

After testing, and using 1-rung alternator logic, it can be done easily using 4 rungs, two external PLC Outputs (1st Half, and 2nd Half), 2 internal PLC relays for the alternator logic, 1 PLC timer, and 1 pushbutton.

Rung 1: Alternator
Rung 2: Output 1st Half
Rung 3: Output 2nd Half
Rung 4: Timer
 
Yes! Found an example of a flip flop circuit and it does exactly what i need and looks far simpler than the attempted methods i was using.

Thanks for the help!!
Regards
Iain
 
check the KEEP function help
the 'Flip Flop function is well described.
 
. . .it does exactly what i need and looks far simpler than the attempted methods i was using.
Congratulations on seeing the light. Let me know if you need more help on this problem.
 

Similar Topics

Hello, I have an installation with an omron plc CP1L with a CJ1W-CIF12 module connected to eight omron MX2 drivers. I use the bus to modify the...
Replies
2
Views
2,147
hello guys... I have done communication with omron cp1l plc and yasakawa v1000 ac drive now I'm able to write drive parameter from plc program...
Replies
5
Views
3,071
Converting the actual program was not a problem. However, when I tried to open my memory file from the CPM1 on the new CP1L I got a message "The...
Replies
2
Views
2,315
Good afternoon, I need to create a recipes display on the hmi ns8, to change the parameters of a servo and some strings . The PLC that im using is...
Replies
0
Views
2,769
I have a problem with my machine....we are using Omron CP1L PLC with a set of temperature controllers and Hakko HMI to control a set of 16...
Replies
2
Views
2,332
Back
Top Bottom