PLC Program & Routines

Ones_Zeros

Member
Join Date
Feb 2014
Location
at work
Posts
367
Hello
I have a PLC test program that has a rung of logix in the "MainRoutine"
Its a simple rung that closes relay and makes the bit true and starts a timer.

I have 3 seperate programs labeled
Run1
Run2
Run3

PLC.jpg


In each of these seperate programs (Run1,Run2,Run3) I have a Memory bit tag with the same label called "Prestart"

I would like to close the relay located in the "Mainroutine" if any of the "Prestart" bits are true in programs (Run1,Run2,Run3)

Since these tags are labeled the same, how would I program these 3 tags
called "prestart" to close this relay and start the timer?

thanks
 
What version are you using? You could use parameters if v24+ otherwise controller scoped tags:

Define a controller scoped tag array such as Prestart[0..3]

In each of your "Run" programs create program scoped tag "Prestart" ALIASED to Prestart[1]C for Run 1 program, "Prestart" ALIASED to Prestart[2]C for Run 2, "Prestart" ALIASED to Prestart[3]C. This allows you to create identical code for each program, but the aliasing ensures unique controller scoped memory is used, thus giving you global access.

Your "MainRoutine" would then reference the controller scoped tags "Prestart[1]", "Prestart[2]" and "Prestart[3]" for evaluation outside the run programs.
 

Similar Topics

Posted this to Reddit with little success, so I figured I would share it here as well. Very new to PLCs, but figured I would give it a shot to...
Replies
0
Views
1
I'm a beginner in the automation field and I've set up an automation system connecting several devices (datalogger, radio, etc.) via Modbus RS485...
Replies
5
Views
181
Hi All, want to ask. I have PLC a programme to control the valve. The existing programme is to control valve A (Y22), and I want to change to...
Replies
2
Views
137
can anyone has a good program to learn plc programming online. i have the basic looking into improve my skills thanks
Replies
1
Views
135
Hi, I am new to ladder logic. I have completed a code in the Xinje PLC XC3-32RT-E for one of the machines I am developing. Currently the program...
Replies
30
Views
935
Back
Top Bottom