Sign in to follow this  
Followers 0
j.brophy@corkillsystems

dupilicated outputs/inputs with universal program

12 posts in this topic

Hi there I have a problem that i have set up a universal program that switches nodes in a pclink setup using inputs apon first scan flag this was so that i could make a universal program that i could have in every plc in a pclink setup and i have theritically doubled up coils ill explane: I have a certain slave node 1 in the system which uses 3100.00 for a common address space for broadcasting to the other nodes. so the program has a ladder with say input 0.00 operating 3100.00 In the other nodes they have 3100.00 as a input to operate something else say output 100.00 on every plc. What the problem is that other node's that has the input 3100.00 also because the program is universal would have 3100.00 as an output for the 1st slave node which turns off the output locally as that part of the program is notbeing used the output coil 100.00 coil turns off/on at great speed in every node except slave node 1 when the output stays constant from slave node 1. I dont have two coils as per say but you could consider the network input to the other nodes as having a network operated coil output with address 3100.00 in them. I could be doing something wrong but i cant get two way communications to work with a universal program that i program every node in the chain with the same program. I have a cp1l plc so i cant have tasks in it an get around the problem that way by ignoring the output part of the program. how would i over come this problem?

Share this post


Link to post
Share on other sites
First, Have you got any logic to determine if the slave is a master/slave/broad-caster? It sounds like the PLC serial Link ( if this is what you are using ), is writing to the 3100 area, which is writing to the output, which is being turned off by your program, causing to switch every scan. Good practice would be to have a condition that only allows the OP to switch if it is required to be. But, with the method you are using, you probably cannot do it quite this way. What you probably need to do, is to prevent the bit in question being transmitted if you can? I would probably allocate memory areas per node address, that should make it more deterministic as to each nodes function, and to when local outputs are required to be switched. If you can post an example of what you are doing, we can have a look so we understand for sure. (I am not sure I understand exactly yet). It doesn't have to be the whole application, just an example so it can possibly be replicated.

Share this post


Link to post
Share on other sites
logic race that what i was thinking. The address area is fixed per node so i am unable to use my own addresses they are fixed as 3100.00 for the first output address for the master plc 3110.00 as the first adress for slave node 1. i am using the built in pclink feature of the plc's. in the apendix it shows you the specific node and the adress you are allowed to use as an output to communicate between plc's as the above adresses so each node has its own specific address space so you can tell which node it is by the address. any plc can read that adress without any underlying network stuff as if it were a locally operated coil and the problem is that i have an output for this coil in the program for all nodes that use that address and the local coil overides the network one and switches it of on on scan of the plc. i have to have this coil to provide the functions to transmit from the specific node so the others can read it. so basically i have a networked operated coil that is being sent from a specific plc and sent to a common readable address space at 3100.00 on every other plc, and in the program in every plc is an output 3100.00 in the program being un used (except in the sending node) in every plc as the program is universal. i have atached a smaple program that i mocked up. R_QCPSW_CP1L_R2009_UPGRADE.cxp

Share this post


Link to post
Share on other sites
Can you point us to the specific outputs that are having the problem, is it the siren & alarm, or the others? This will save us spending more time than necessary trying to work out what is going on.... By the look of it, you have got the serial port setup working correctly??

Share this post


Link to post
Share on other sites
i have just attached a sample working program for the two nodes there are two programs slave and master modes that i have managed to get working via pclink and have 2 way communication working between the two obviously i dont have the serial port select function (stup) in there and the settings are pre set when programmed in. i can quite happly talk with this and not get relay chatter R_QCPSW_CP1L_HERDFLOW.cxp R_QCPSW_CP1L_HERDFLOW_JUNCTION_BOX.cxp

Share this post


Link to post
Share on other sites
i have got the serial port setup working and it will retain the keep function on power up and power down using the non volitile datamemory as a backup when the unit is powered off and recover it on the first scan flag to aviod having to reset the node number on the power being reset. on the single program in all nodes when i try to turn on in the slave plc outputs from the master it chatters also same with the master any transmission from the slave to the master causes a chattering input on the master.

Share this post


Link to post
Share on other sites
So if you try to turn on slave output xx from the master, then that output chatters in each slave? And if output xx is turned on in a slave, then the output chatters in the master? Sorry for repeating what you have probably said already, just trying to understand your application/issue. Edited by lostcontrol

Share this post


Link to post
Share on other sites
Ok, When you define if each node is a master or slave, you are also defining the slave address? I haven't looked up how the serial setup function sets the parameters since you last posted on this, and your comments don't lead to what each address is allocated for. Anyway, correct me if I am wrong, you are using the method in the image I have attached? If so, then in rung 7 of your xx_UPGRADE program, you use set_master_plc (H2.09) to determine if the unit is a master or slave? Then, if this is a slave (H2.09 = Off), then the state of the inputs are reflected to the master. If the unit is a master, then the inputs are reflected to the slave(s)? So, if this is all correct, then again in rung 7, and this PLC is a the master, you are trying to turn on the outputs received from the slave (3110.00 - 3110.15), this is where I think the logic race is happening.. Again, if this is all correct, then you need to replace the outputs that are in the range 3110.00 - 3110.15, to 3100.00 - 3100.15. Does this make sense? The basic concept is: The master writes to 3100-3109 in all slaves, Slave 0 writes to 3110 in all other units, including master Slave 1 writes to 3120 in all other units, including master This is all in the manual, page 356. I have added an example on the last rung after the END instruction in the attached file. At the least, this is how I would approach it, I do not have any hardware to test this, so am not providing any guarantees that this is correct. CP1L_PC_Link.cxp Edited by lostcontrol

Share this post


Link to post
Share on other sites
yes that is correct i have ripped out the part of the program to aviod confusion but it is basically what i have here on my computer

Share this post


Link to post
Share on other sites
i see what you are doing a bit smarter than what i come up with but it will still logic race as mine does after the end instruction you have the output 3109.00 as a output to broadcast to all the other nodes if the program were in the master node. if that program were in any other node it would still have that coil in it for the master node but it wont be operated so it reads the network 3109.00 and then scans down to the master part of the program and will turn off again as the coil for the master part output of the program in the slave node wont be on (turn the coil off locally). this is what i beleve is happening in my case. if you output 3109.00 from the master but read it as 3509.00 (for example) in the other nodes this would not happen but you cant do that. as you could turn on 3109.00 on the slave and not effect the transmission from the master broadcast on 3109.00 but recieved on 3509.00. im not trying to operate my adress 3109.00 locally but it is in the program for the use by the specific master node and will be turned off in all others locally. how i see it is that the program will read the input in the slave (from the master) then it will scan through the program and get to the master part and turn it off again. correct me if i am wrong but effectivly i have 2 coils in the program (theritically) one being network operated and one being local both having the 3109.00.

Share this post


Link to post
Share on other sites
I under stand that you can use task and break points to ignore parts of the program then it wont effect any thing as it will miss the part of the program with the local output on the nodes recieving the broadcast. from what i understand i may be able to use a jump command or tasks but i have no experience with either (we have just moved from the cpm1a plc) and i beleve i cant put my program into a jump because i are using steps in the program as i tried to put my program into function blocks but i had that problem. I dont really see a way around this problem unless the adresses were transcribed to different locations upon recieving them on another plc apart from skipping code some how. i have attached my sample program i have tided it up dramitically if i pull out the stuff specific to each node from the program and write to individual nodes it operates but as one program in all it fails to read or write inputs or outputs from either device. many thanks for your help but i may be at an end at least im not going mad and thaught i was doing something wrong. SAMPLE_2WAY_.cxp

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0