I'm using EASY215 with CoDeSys.I tried the Traffic light example but had some problems.Can anyone provide me with step by step guide to do programming.Any useful docs will be a great help.Currently I'm in need of a simple program to blink a LED with the press of a button.
You can even give me sample programs or tell me as to where shall I get them.
Thanks in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's easy to just toggle blinking of e.g. a led. Try this code in your project.
PROGRAMPLC_PRGVARButton1AT%IX0.0 : BOOL; (* A button connected to first digital (binary) input *)Led1AT%QX0.0 : BOOL; (* A led connected to first digital (binary) output *)Blink1 : BLINK; (* Make an instance of Blink FB. Found in Utils.lib *)Trig1 : R_TRIG; (* Rising edge detection. Found in Standard.lib *)xBlink : BOOL :=FALSE; (* TRUE=Blinking enabled, FALSE=Blinking disabled *)END_VAR---Trig1(CLK:=Button1);IFTrig1.QTHEN(*Ifdetectedarisingedge*)xBlink :=NOTxBlink; (* Toggle blink state *)IFNOTxBlinkTHENBlink1(ENABLE:=FALSE); (* Reset blink routine *)Led1 :=FALSE; (* and output. Doing a OUT=>Led1 does not guarantee to switch led off *) END_IFEND_IFIFxBlinkTHENBlink1(ENABLE:=TRUE, TIMELOW:=t#500ms, TIMEHIGH:=t#500ms, OUT=>Led1); END_IF
👍
1
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Do you mean example routines built using function block diagram technique? Any particular operation in mind? By the way, I would strongly suggest searching for examples. There is a lot of them in this forum, alternatively google.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yeah I want simple FBD routines.I'm learning fbd so that i'm finally able to implement openCAN on easy215 PLC chip.So can you help me with this objective in mind?Well ST programs would also be fine..
Take Care.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi to all you techies.
I'm using EASY215 with CoDeSys.I tried the Traffic light example but had some problems.Can anyone provide me with step by step guide to do programming.Any useful docs will be a great help.Currently I'm in need of a simple program to blink a LED with the press of a button.
You can even give me sample programs or tell me as to where shall I get them.
Thanks in advance.
It's easy to just toggle blinking of e.g. a led. Try this code in your project.
Hey Buddy...Thanks a lot for the program.It ran successfully.Can you give me some more progs on fbd.
Thanks in advance.
Do you mean example routines built using function block diagram technique? Any particular operation in mind? By the way, I would strongly suggest searching for examples. There is a lot of them in this forum, alternatively google.
Yeah I want simple FBD routines.I'm learning fbd so that i'm finally able to implement openCAN on easy215 PLC chip.So can you help me with this objective in mind?Well ST programs would also be fine..
Take Care.