Please help Extract Data from a 5/04 with another 5/04 on a DH+

soop7667

Member
Join Date
Sep 2003
Location
Naples, FL USA
Posts
99
I've got a DH+ Network with 3 SLC 5/04's and 2 PV1000's. 1 of the SLC's is being used solely as my PC Interface - I'm doing a DF1 Pass-Thru on it to get onto the DH+ through the RS232 Port. I use an Excel workbook extensively to record data through DDE/OPC Links. At times Excel may be shut down and during these times I obviously can't record any data. I'm wondering if I can use the SLC 5/04 to "Poll" for data from the other 2 SLC's. I don't want to edit any of the Logic in either of the two SLC's which will have the data I wish to capture. Thanks
 
Hi

You can use your PLC as buffer .So the PLC will get the informatin save it and transfer it to your Excel.
There is 2 problems with that.
1.Do you have enough memory in your PLC.?
2.How long it can last.?
In the bottom line the memory will be full.
So you might loss info again.
 
I've heard about the MSG Instruction and I've looked at it but I'm not sure how to set it all up. The PLC I'll be using has 32K of memory - and Not a single line of logic in it.
****EDIT****OK I've got it a MSG Instruction set to remote, selected n7:0 as my control block - now on the setup screen I beleive I see where to put the node address but I need help understanding the Remote Bride and Station and Link ID Addresses - Should I have some unique values set in each of the other TWO SLC's? for those addresses?????
 
Last edited:
soop7667 said:
I need help understanding the Remote Bride and Station and Link ID Addresses...
These are used when you're bridging from a DH+ network across a DH network to a third DH+ network. Since you have three SLC's on one DH+, you're only going local. Use the default or ignore.
soop7667 said:
I've heard about the MSG Instruction and I've looked at it but I'm not sure how to set it all up. The PLC I'll be using has 32K of memory - and Not a single line of logic in it.
You'll need to add some logic if for nothing more than providing a place for the message instruction to hang out. Since polling takes place at some timed interval you'll also need one or more timers to trigger the message instructions. As Tom Jenkins notes, you'll be reading from the other processors; therefore it can be done with no logic changes in them.

If the intervals are far apart (a relative term) you may be able to use separate MSG instructions for each set of data. If however, there could be a lot of data collected while the other system is offline, I'd think you'd need to set up some sort of indirect/indexed scheme to place the data in files.

Then too, you'll want some way for the Excel system to collect the stored data and trigger the collecting PLC to dump what it's got and start over.

BTW:

a. How is the PLC going to know when to start collecting?

b. How much data (number of words) do you expect to be collected in the PLC?

c. Is the information in the target PLC's in one general area, or is it scattered all over?

It's slow right now. Folks will be along by and by to help flesh this thing out.
 
I want to gather the ACC Value of two Counters on SLC #1 and the same two counters on SLC #2. It should do this once per minute. I Will probably use the EQU Instruction and compare S:42 (Seconds) with "0" with a OSR to trigger the MSG. Getting that data stored into different files is where I'll need some pointers. I know nothing there.

The PLC will start recording Data when the Cycle Counter is Reset by the Panelview. The Data I'll be gathering is the ACC value for C5:4 (Hundreds) and C5:5 (Thousands) which are the Cycle Counters for our Concrete Products Machines.
I'm thinking since the production counters are reset on each machine at seperate times then I'll need to store the data in two seperate areas - one for each machine.

Is that four "Words" I'm gathering? My Terminology vocabulary is Terminal. :rolleyes:

I'd like to store the entire days cycle counts every minute for up to 24 hours. Thats 1440 Minutes X 4 Words = 5760 Stored Values. Is that too much??? There is another option - if the SLC Can't store that much data then perhaps a few hours of data?
 
Another Snag - I've never used the MSG Instruction before - My Target Device is a SLC - I'm trying to extract the ACC Value of c5:4 but if my target address is c5:4.acc i get an error - if i address it as c5:4 then no error is returned. My "This Device" data table address is N7:1 - so ummm Is it going to put all of C5:4's bits values in N7:1?
 
soop7667 said:
I want to gather the ACC Value of two Counters on SLC #1 and the same two counters on SLC #2. It should do this once per minute. I Will probably use the EQU Instruction and compare S:42 (Seconds) with "0" with a OSR to trigger the MSG. Getting that data stored into different files is where I'll need some pointers. I know nothing there.

Your triggering method sounds OK. The clock in the PLC isn't necessarily that accurate but it should suffice for what you're after. I haven't worked with a 5/04 but I'd guess it does have indexed addressing available. Is there a checkbox somewhere in the processor status words called "Allow indexing across files"?

soop7667 said:
The PLC will start recording Data when the Cycle Counter is Reset by the Panelview. The Data I'll be gathering is the ACC value for C5:4 (Hundreds) and C5:5 (Thousands) which are the Cycle Counters for our Concrete Products Machines.
I'm thinking since the production counters are reset on each machine at seperate times then I'll need to store the data in two seperate areas - one for each machine.
Yes, you'd want to separate areas (files). IMHO, it would make addressing easier to have separate files for each value stored - machine #1,hundreds; machine #1, thousands, and so on. That'll be four files.
soop7667 said:
Is that four "Words" I'm gathering? My Terminology vocabulary is Terminal. :rolleyes:
Yes. Even though you may have to read three words for each counter (control, preset, accumulated), you'll only need to store one of them.
soop7667 said:
I'd like to store the entire days cycle counts every minute for up to 24 hours. Thats 1440 Minutes X 4 Words = 5760 Stored Values. Is that too much??? There is another option - if the SLC Can't store that much data then perhaps a few hours of data?
Shouldn't be a problem here. Since the SLC has 32k and you're only using ~6k* for data, you've got over 26k left for ladder logic. That's a lot.

* actual file organization may affect this.

soop7667 said:
Getting that data stored into different files is where I'll need some pointers. I know nothing there.
My approach would be to focus on getting the MSG instructions working first so you can at least get your values into the logging PLC. In the meantime, do you have access to the SLC programming manual? I'm thinking indexed addressing will come in handy for this effort and the manual has an explanation of how it works.
 
Last edited:
soop7667 said:
Another Snag - I've never used the MSG Instruction before - My Target Device is a SLC - I'm trying to extract the ACC Value of c5:4 but if my target address is c5:4.acc i get an error - if i address it as c5:4 then no error is returned. My "This Device" data table address is N7:1 - so ummm Is it going to put all of C5:4's bits values in N7:1?
First, I saw in the other thread you're using N7 for the control file also. I recommend creating a new file to receive the remote data. Since memory's cheap it would be even better to make two new files, one for each remote machine. Because you're forced to read C5:4 rather than C5:4.ACC, the message instruction SHOULD - I haven't actually done this - read three words per counter (or timer, if that's your pleasure). If you create N12 with a size of six you can set the MSG up to read C5:4 with a length of two. This will then get C5:4 and C5:5 in their entirety and place their contents in N12 thusly:

N12:0 N12:1 N12:2 N12:3 N12:4 N12:5
C5:4.CTL C5:4.PRE C5:4.ACC C5:5.CTL C5:5.PRE C5:5.ACC

 
OK...I've got the MSG Working - I used the following...



T4:1 T4:1
000----]/[------------------------(TON)---
DN pre 60


____MSG-NODE1
T4:1 |N7:0 cont.|
001----] [-------------|C5:4 Target--------
DN | |6 elements| |
| |N7:29_Dest| |
| |
| ____MSG-NODE10 |
|____|N7:14 cont|____|
|C5:4 Target
|6 elements|
|N7:35 Dest|





So My SLC #1 Data Is N7:31(Hundreds), N7:34(Thousands).
SLC #2 Data is N7:37(Hundreds), N7:40(Thousands)

I'd like to do some math to it putting the value together such as Multiplying 1000 Times the Thousands Count then adding the Hundreds Count and Moving the value to an Indexed Address.
 
soop7667 said:
I'd like to do some math to it putting the value together such as Multiplying 1000 Times the Thousands Count then adding the Hundreds Count and Moving the value to an Indexed Address.
Not a problem as long as the combined values don't exceed 32767. In fact, that would halve the data storage requirements, thereby doubling the storage capacity. It would be prudent to put some validation logic in front of the math instructions to forestall an overflow condition.
 
On Average we run 7000 - 9000 Cycles per day - The Maximum Possible is around 10000 - And that has never been reached. As Far As Math Overflow - I know I've got some rungs in one of our Machines Programs that is a Math Overflow Reset - I think it does something with one of the status bits - But I'm not sure what Math Overflow is...Can you explain?
 
Anybody more knowledgeable feel free to correct me if I put down anything stupid. Here goes.

Assume you had 43,186 to convert. When the multiplication (43*1000) takes place the result is too large to fit in a sixteen bit signed integer (max. positive value 32767), which the SLC uses. The processor will flag this as an error and shut down - unless, as you have done, some reset logic is included at the end of the program. The problem of incorrect results still exists, it's just that the processor is prevented from doing what it would naturally do. This overflow behavior is not limited to SLC's or A-B processors.

Ron Beaufort's link has a more detailed explanation. Thanks Ron! :)
 

Similar Topics

Please help me, I have solve many week but still not solve it. I found trouble of factory talk studio when I set tag by browse address of OPC...
Replies
0
Views
80
Hello Everyone, i Have im my Industry a Endress & Hauser Promag400 this has a screen that constantly have that error, it says to wait, somebody...
Replies
2
Views
428
After replacing the 70 with the 525, the PLC can read from the drive and recognizes it as online, but no commands are being listened to. PLC is...
Replies
1
Views
494
To quickly test a plc output which is wired to a relay do I dob a cable between the output and 24vdc+ source I.e something with 24vdc+ live such...
Replies
6
Views
635
"Hello, I am a beginner learning about PLC. Could you please give me some advice? I want to write PLC instructions as follows: When the sensor...
Replies
18
Views
3,233
Back
Top Bottom