SLC 5/04 communication over DH+

Hmm, so it means with out having two racks, and two PSU's i will not be able to test this. Anyway in your example, u only give me read example, what about the Write one? how would it work? i have a huge amount of data addresses which are R/W both?
 
mellis said:
PLCNovel,

See if this meets your needs.

You have a PLC in the field (call it PLC B) with some data scattered around in various data files that another PLC (call it PLC A) needs to access. PLC A is the one that will be doing the reading and writing. PLC B just has to provide the data to PLC A and accept some data from PLC A. I think that is what you have described so far. The question is, what do you have to do in PLC B?

First make two lists. One of all the data addresses that you have to provide (read from PLC A) and one of all the data that PLC A is providing (write from PLC A). It would be a good idea to let us see that list. For the sake of simplicity, I will assume that none of the data is floating point (file type F). So all the data you need to deal with is of type B or N.

Pick an unused integer file (type N), say file N10. It would be nice if you can use the same file in both PLCs. Allocate a chunk of file N10 for data from PLC A and another chunk for data to PLC A. I generally allocate at least 10 words each way as a minimum. In reality you can allocate up to 100 words in each direction and the message performance is essentially the same.

Arrange all the data in a nice neat package in this file. Use Excel to layout where each bit and word of your data gets assigned in file N10. Once you have it all laid out, you can add a group of rungs to move the data into and out of file N10. For words of data, you use a MOV instruction. For bits of data, you use an XIC and OTE instruction for each bit (contact and coil). It's a bit tedious, but if you want to move scattered data in a single message, that's what it takes.

Give the person responsible for programming PLC A a copy of your Excel sheet and he will have all the info he needs to decode the N10 file on his end.

There is one thing you mentioned in your first message that causes me a little concern. You said some of the data is R/W. You can do this, but it will take extra logic in PLC A. Basically, each individual point can do one or the other at any given time, but it needs to decide which it is doing at the moment. That might be the responsibility of the person programming PLC A. For you it may be as simple as R/W data just goes in both chunks of data, but you should find out.

Show us the list of data, I'm sure there will be more suggestions once we see what you are actually dealing with.

Good luck,

Hi Dave the reason for transferring the data in the slave processor is due to the above quote. Even if you take a look at my excel sheet, the integer addresses come from various integers files and also if you read mellis idea quoted above, you might be able to guide me what i need to do in order to manage the msg data traffic in my project. Also the client wants from me a integer file or files to work with...
 
plcnovel said:
Hmm, so it means with out having two racks, and two PSU's i will not be able to test this. Anyway in your example, u only give me read example, what about the Write one? how would it work? i have a huge amount of data addresses which are R/W both?

I only gave you a read example as i thought without spoon feeding you the least you could do was to have a go at doing the MSG write yourself ? Its in the first AB Example i posted....

plcnovel said:
Hi Dave the reason for transferring the data in the slave processor is due to the above quote. Even if you take a look at my excel sheet, the integer addresses come from various integers files and also if you read mellis idea quoted above, you might be able to guide me what i need to do in order to manage the msg data traffic in my project. Also the client wants from me a integer file or files to work with...

And as per a previous post use the MOV or COP command.
 
Is there any specific location inside my main program where i need to put the MOV or COP instructions. I have a big program that executes different subroutines in each scan, now in order to MOV these values , shd i write another subrouotine which will be full of MOV or COP instructions to move the data in and out of this file?
 
plcnovel said:
I am working in the industry and just got a new job, thats why i am not that experienced.

plcnovel said:
I know i am asking too much but i am stuck right now as the deadline is coming tomorrow

plcnovel,

the only chance you have is posting the code and maybe some one can help, in the short amount of time you have you have a lot to learn...tomorrow comes quick

edit: you can put the mov or cop anywhere, but lad 2 would work just fine
 
Last edited:
Hi Geniusintraining
Well there is no code to be written as for as my understanding is concerned. I have attached a list of data addresses that needs to be read and r/w from a remote plc over dh+. the way i am doing this is as follows:

Since i have pretty consolidated data, so i maded two data files one for Bits and one of Integers. The integer file will contain all the read and read/write addresses of the attached file and same with the bit file. Now the problem is how can i map the values to his new datafiles. Lets say i have created N30 file for integers, total elements of 250. I would like to assign first 90 elements to the read only addresses in the excell sheet attached and the remaining to R/W addresses in the excel sheet. One problem is how would i do that? The second problem is once i did this, lets say from a remote plc, a read call comes thatwants to read a value associated to N7:0 data address, which is mapped to N30:0, how would i do manage it? and lets say for write example a write call comes from a remote plc say writes to N7:79 address which is mapped to lets say N30:100, how would i take that new value of N30:100 and writes to the field devices in the program. I hope that clears a lot of understanding problme that have been created by me due to lack of experience. Thanks
 
How on earth did you get the job ? you clearly haven't a clue what you are doing ! the AB message function is easy as anything , just tidy the data up . If you can't be bothered to even have a try at it , why should anyone help you - you shouldn't have the job in the first place .
 
plcnovel said:
Hi Geniusintraining
Well there is no code to be written as for as my understanding is concerned. I have attached a list of data addresses that needs to be read and r/w from a remote plc over dh+. the way i am doing this is as follows:

Since i have pretty consolidated data, so i maded two data files one for Bits and one of Integers. The integer file will contain all the read and read/write addresses of the attached file and same with the bit file. Now the problem is how can i map the values to his new datafiles. Lets say i have created N30 file for integers, total elements of 250. I would like to assign first 90 elements to the read only addresses in the excell sheet attached and the remaining to R/W addresses in the excel sheet. One problem is how would i do that? The second problem is once i did this, lets say from a remote plc, a read call comes thatwants to read a value associated to N7:0 data address, which is mapped to N30:0, how would i do manage it? and lets say for write example a write call comes from a remote plc say writes to N7:79 address which is mapped to lets say N30:100, how would i take that new value of N30:100 and writes to the field devices in the program. I hope that clears a lot of understanding problme that have been created by me due to lack of experience. Thanks


OK Here is the code what i have done so far in it. I have just attached my files and data files that i created specifically for this issue (Not the whole program) I have created a Integer file N30 of 200 elements. I am using first 91 elements for my read only addresses in the attched excel sheet. The remaining addresses of N30 file has been used for R/W addressed of the attched excel work sheet. Basically i have written three subroutines called "READ DATA" which copies (maping) the values read only addresses into N30:0 to N30:91. "R/W DATA" routines copies the R/W addressed in the remaining elements of N30. And finally "WRITE DATA" routine basically writes the values of R/W addresses back to the field devices addresses for write msg instruction coming from a master plc. Actually "WRITE DATA" routine is exactly the opposite of "R/W DATA" routine, just interchanging the source and destination addresses.

I dont know what i have written is gonna work 100% or not, if you guys can take a look at the code and corrects it if there is a mistake it will be a great favor. Secondly, if this code works fine for what i have been trying to describe in this thread, then is there any smarter way to do this, because "READ DATA" "R/W DATA" "WRITE DATA" routines are executing in every scan, so is there a way they get only executed if there is any read or write msg instructions coming from a master plc. I hope it will clear my point this time. Thanks in advance
 
this is the best I can do....time to go...its a screen shot of two that i'm using

good luck
 
Hi Everyone Thank you very much for your kind support. Just wanted to do a recap what i wanted to attain from this thread:

Currently the application is running under normal mode and controller by a HMI (which is PV1000). Now the customer wants us to add another funtionality in the application:

Customer wants to access some of the data file addesses (which are the part of PID loops and some of them are read only and some of them are R/W only. All of these data addresses are of type B and N and are scattered in various data files such as B10, N7, B3, N12, N11 etc). Customer wants us to provide him a one or two files (one for Integer or one of Bit type) so that he can msg back and forth from his remote plc to these data addresses so that he can read the info from the PID loops and write to the SPs, gain and reset etc. For this i know since we are only required to provide him with teh data files, hence not a lot of programming involved in it as for as our plc is concerned. My question which i have not been able to solve is how can i manage the traffic of the msging. Like now one data address can be controlled by two controls, either from the normal program/HMI or remotely through another plc thru msging instruction. As for as making a data file is concerned i think i have created this. I have made two files one is N30 and other one is B31 type and i copied all the values of N which were scattered in different Ns to N30 and same is true for B31 file. So by doing this , if customer sends a write msg instruction to lets say N12:8 which is setpoint for a pid loop, and this N12:8 is mapped to my created file N30 at location 70, then how would i manage it to map it back to N12:8? In other words how would i make a decsion when to write back from mapped file (N30) to the actual data address in the program? I hope i clear this poitn. Please try to understand my situatio i am in a mess situation, its due on wednesday and i have no idea how to go from here. Thank you very much for your help.
 
I've done a similar project. You need to keep the Data you are reading from the PLC and the data you are writing to the PLC in seperate files, or you'll come unstuck really quickly. In your example you would have to write your setpoint value to another integer file (say N32:8)and then put a MOV instruction to move this data to N12:8, then on a subsequent rung you need to COP N12:8 to your N30 file for your display back to the other PLC.

There's still a lot of issues with this program - you need some sort of logic to detect an out of range setpoint (i.e. if somebody keys in say '222' instead of '22'). Also you need to consider some logic to leave the machine in a safe condition if the Data Highway communications fail or 'lock up'.

Best thing to do because of your time constraints, would be to give this project to somebody with a bit more experience - and watch and learn what they do.

Good luck, Tim.
 
Just out of interest who's plant are you working on? maybe in the petrochemical industry... I know, I bet its the one that just went Kaha.. Booombah...

This thread has all the makings of a Chernobyl melt down.
A little information can be a very dangerous thing in the hands of the inexperienced.:unsure:

Professionally I don't thing this type of tutoring should be encouraged,we do have an obligation to the health and safety of the people working at this site.

Just the way I see it.
Lance
 

Similar Topics

Hello, I need to connect with a SLC 5/01 (1747-L511) in order to see what is the current program that it has, since I don't have a lot of...
Replies
5
Views
708
After I tried wiring, I used computer program communication to read the PLC N value, but received a NAK signal. And the DL3500 CHA light keeps...
Replies
0
Views
427
Hi all--figured I'd knock the rust off minds here; Situation--We're resurrecting an old Alvey Palletizer from the grave. It came w/o a controller...
Replies
2
Views
946
Hey everyone, I am trying to communicate with a Slc 5/04 plc using the 1747-cp3 cable, RS232-DF1 driver and a laptop. I tried using a serial to...
Replies
13
Views
3,099
Hey everyone. This is my first post here. I am newer to the automation world and have had an issue while trying to communicate with an SLC 5/02. I...
Replies
13
Views
5,439
Back
Top Bottom