Roller door... next phase

L D[AR2P#0.0]

Lifetime Supporting Member
Join Date
Nov 2006
Location
UK
Posts
6,703
Next phase is to use a global DB to specify which I/O to use for the roller door.

Start with InPEC - move InPEC boolean from the input section to the stat section. Add two more inputs called iInPECByte and iInPECBit both of type integer (this is for ease of monitoring)

Create a DB (say DB100) with an array[1..3] of structures called DoorConfig containing iInPECByte and iInPECBit

Update the calls to the doors using the byte/bit numbers from the DB
 
Create a DB (say DB100) with an array[1..3] of structures called DoorConfig containing iInPECByte and iInPECBit

Update the calls to the doors using the byte/bit numbers from the DB

Not 100% sure on this.. this is what I have done, but do I do this for each?

pic1.GIF
 
Click in the comment section of the last declaration then hit return to enter another declaration.
 
That's the point - you are not going to pass the input as a bool anymore, you are passing the address of the input via the byte & bit number instead.

Read post #1 again.
 
Last edited:
Morning, been reading this morning and I think, I know roughly how to complete this using something along the lines of "DB3".DBX2 for example the part that is throwing me is in our array we are using two seperate locations one for the input byte and one for the bit. Im not sure how to combine them in the call? This doesnt mean Im giving up though.
 
Just had an idea could I use this format maybe, dont have access to simatic at work so cant check it?

P#<area><byte>.P#<bit>
 
Last edited:
.... Add two more inputs called iInPECByte and iInPECBit both of type integer...

You are going to pass two integers to the door FB, they will be combined inside the FB to form the inidrect address and access the actual input.
 
Arrrhhh god dam... I know where I've gone wrong, for someone reason when I modified fb2 I assumed the new parameters iInPecBtye and iInPecBit would already be there when I called the FB. Thank you for being patient with me
 

Similar Topics

Here you go guys, here is my present code I have been working on.
Replies
1
Views
1,362
Hello all -- I have a Fuji controller that has an ethernet card and am looking to translate the code to a GuardLogix 5380. Any suggestions on how...
Replies
0
Views
18
Hello, fellow PLC enthusiasts, I’m a newbie in PLC and am currently on a project that involves connecting an Omron CP1E (CP1W-CIF11) PLC to an...
Replies
2
Views
74
Hello Folks, I have two watlow controllers that have two J-type thermocouples connected to two heating block on a sealing equipment. The...
Replies
3
Views
99
Hi Everyone, I own a GE Versamax controller that I purchased for a class at Long Beach City College a couple of years ago. I lost the use of my...
Replies
12
Views
354
Back
Top Bottom