Help - Search - Members - Calendar
Full Version: help programming
Forums.MrPLC.com > PLCs and Supporting Devices > Allen Bradley
bupesh
Hi all,

This is Bupesh, I am new to this field.. looking for help to learn plc programming. can any one help me in writing simple programs at this point.. i am using logix5000 sftw.

I am tryin to write a program for blinking light with 5 sec pause.


I will appreciate any ones help.


Regards,
Bupesh.
TWControls
Hi Bupesh

You may want the check out our downloads section HERE

Do you have a PLC to play with? Have you played with timers any yet?
bupesh
yep, i do have logix 5561, i did not try anything till now.. was tryin to write a program to switch on the light and make that blink 5 times every 3sec but could not do it.





bupesh
Hi all,

I need help to rectify the Error in this basic program. I am not able to solve the prob.

I will appreciate your help.

following is the prog.[attachmentid=2963]

Regards,

BobLfoot
QUOTE(bupesh @ Aug 10 2006, 02:42 PM) [snapback]38076[/snapback]

yep, i do have logix 5561, i did not try anything till now.. was tryin to write a program to switch on the light and make that blink 5 times every 3sec but could not do it.

Can you Post your Last attempted program and what problems you saw with it? I'm sure the experts here can help you in the right direction.
TWControls
I merged you two topics, try not to start another thread with it relates to one that you already have open.

The problem is your addressing. You have correctly created a tag named "Timer" of data type "TIMER".

When you address this timer in a TON you just type "Timer". That will get rid of you error but we need to go through some basic addressing information to help you get you flasher working.

Let me go see if I can dig up one of my distinguished colleagues informative post (yes I'm going hunting for one of Ron's lessons smile.gif )
bupesh
Thank you. i will try the way you said.
Ron Beaufort
Greetings bupesh,

if I understand your project correctly, this should help ...

changing the timer's Preset value will change the "period" of the flashing cycle ... I currently have it set for 5 seconds ...

changing the value of Source B in the LES instruction will change the amount of time that the light stays on ... a lower setting gives less "on time" - and a higher setting gives more "on time" ...

[attachmentid=2970]

please let us know if you need more help ...

EDIT ... for your "make that blink 5 times every 3sec" requirements, try setting the Preset to 600 and Source B to 300 ...
BobLfoot
bupesh
I just wrote some code last night that might be close to what you need. It was intended to sound a horn X times with the horn being on for A ms and off for Bms. It would then wait Y seconds before repeating the X times pattern. Since I am at home without RSlogix I'll list the mnemonics here.

Rung 0 - Timers for On and Off Length of Horn
SOR XIO Horn_Pulse_Count.DN XIC Alarm_Exists_Flag XIO Horn_Silent_Timer.DN BST TON Horn_Sound_Timer 1000 0 NXB XIC Horn_Sound_Timer.DN TON Horn_Silent_Timer 500 0 BND EOR

Rung 1 - Counter to Determine Number of Pulses
SOR XIC Horn_Sound_Timer.DN CTU Horn_Pulse_Count 4 0 EOR

Rung 2 - Timer to set the Interval between pulse sets
SOR XIC Horn_Pulse_Count.DN BST TON Between_Set_Timer 2000 0 NXB XIC Between_Set_Timer.DN RES Horn_Pulse_Count BND EOR

Rung 3 - Actual Horn Rung
SOR BST XIC Horn_Test_Pushbutton_Input NXB XIC Horn_Sound_Timer.TT BND OTE Actual_Horn_Output EOR

Bupesh - you can obviusly modify the count to 5 and adjust the time to what you need. Also you can replace horn with light.

Ron - Care to share your wisdom on using 2 timers versus using one timer and a compare {LES, GRT, etc} .
Ron Beaufort
Greetings Bob,

you asked:

QUOTE
Ron - Care to share your wisdom on using 2 timers versus using one timer and a compare {LES, GRT, etc} .


I'm not sure that "wisdom" is the right word, but this post might help explain why I personally prefer the "one timer" approach ... I know that many programmers like the "two timer" approach instead ... I run into it quite often ... variety is cool ...

This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.