Roller door... next phase

L D[AR2P#0.0]

Lifetime Supporting Member
Join Date
Nov 2006
Location
UK
Posts
6,697
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,360
Hello! If someone can help me with the following problem. I can't change the phone number. Do I really need the interface (AL-232CAB - Programming...
Replies
0
Views
51
I have Woodward Controller EASYGEN-3500XT and Phoenixcontact make IO CAN-CUPLER part no: 2702230, Analog Input card: 2861412, Analog Output Card ...
Replies
0
Views
42
Hello I have a s7-1200 and I would like to read the tags present in this controller with my controllogix controller. The two controllers don't use...
Replies
5
Views
168
Everything was working fine, but suddenly CPU went into error mode, and the ERR and TER LEDs lit up. Now I can't download or connect with the PLC...
Replies
0
Views
48
Back
Top Bottom