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

Without a very good understanding of Math Overflow - I just put my math logic into the PLC without it - I also considered the fact that it's physically impossible to run one of our Concrete Products Machines more than 10,000 Cycles in 1 day let alone 32,767. I just want to get the ball rolling anyways - I can always put that in later when I fully grasp how to validate it. So now I have 2 more rungs - one of which Multiplies the Thousands Count of each machines cycles Times 1000 and Latches a BIT which denotes that the Values have been multiplied. Then as long as that 'Multiplied' bit is energized - The Second new rung Adds the Hundreds Count of each machine to their respective Multiplied Thousands Count. The Destinations are N7:40 (Machine #1 Finished Cycle Count) and N7:50(Machine #2 Finished Cycle Count) After the Hundreds have been added to the Thousands I Latch another Bit which Denotes that The Addition Has been Executed - That Bit prevents the Addition from happening again until it is unlatched when the Multiply Rung Executes.

Now I need to Store N7:40 and N7:50 Into two different Files and Index the address each minute when I plug a new value in. (This is what I really need some help on.) Indirect Addressing I believe Is the way to go.
 
Last edited:
I've Looked up what I could find in the SLC Instruction Set Manual - I'm understanding a bit better It looks like S:24 is the pointer? I'm thinking I could use a Counter and a MOV Instruction - Each time My Minute Timer Times out And the Math Operations complete I can Add 1 to the counter then MOV the Counter Value into S:24. Create two N Files, one for each machine. Then When I do the MOV I can make the Destination #N10:0 - and S:24 is my offset. Sound right?
I'd make the other Machine use #N20:0. So I think thats it? is it?
 
Indirect addressing

soop7667 said:
Now I need to Store N7:40 and N7:50 Into two different Files and Index the address each minute when I plug a new value in. (This is what I really need some help on.) Indirect Addressing I believe Is the way to go.
It looks like you've got the messaging and conversion taken care of, so, I'll say this about indirect addressing - You can get there from here but it ain't a good place to start from. Why?

SLC files can be 256 words maximum. You're going to need at least five 256-word files and part of a sixth to hold data from a 24-hr period. I'm open to correction/enlightenment here but, the only way I see indirection working here is to do some manipulations based on the current 'index' of where to store the incoming minute's data. Something along the lines of:

Divide index/256 and
store result in fileno
MUL fileno*256 and store
result in T1
SUB index-T1 and
store result in wordno
then:
MOV newdata N[fileno]:[wordno]

I read your reply while formatting this post. You've got it! For the sake of explanation I'll continue.

The same action outlined above would be done with indexed addressing just as you think.

ADD index_1 1 index_1
MOV index_1 S:24
MOV newdata #N10:0

So, the data for the 687th minute on machine #1 will go into N12:174, if my math is correct.

Just remember to make the files for each machine contiguous, enable "Indexing across files", and validate the index value (in this case, a positive number between zero and 1440), just in case.
 
I've read a little of that too while I was there
Just remember to make the files for each machine contiguous, enable "Indexing across files

I'm assuming you meant the PLC I am Storing the Data in - So does Indexing Across Files being enabled Mean theat when I refer to #N10:0 and the offset is greater than 256 it will go to the next file address? (N11:0)? And the opposite - If it's not enabled it will stop at N10:255?
 
soop7667 said:

I'm assuming you meant the PLC I am Storing the Data in - So does Indexing Across Files being enabled Mean theat when I refer to #N10:0 and the offset is greater than 256 it will go to the next file address? (N11:0)?
Yes.

Correction: File addresses can run from 0 to 255, that's 256 words. If the index register holds the value '255' the last word of N10 will be referenced. If the index register holds the value '256' word zero of N11 will be referenced. If the index is 257, N11:1 will be referenced, and so on.
soop7667 said:
And the opposite - If it's not enabled it will stop at N10:255?
Not only will it stop, I'm pretty sure you'll get a processor fault.
 
Last edited:

Similar Topics

please help me . I have to make this ladder diagram and I can’t figure it out :(
Replies
12
Views
359
Hello, I am trying to get a Yokogawa Hart pressure Transmitter and a Rosemount Temp Transmitter to read on a 1769-IF4 module on an L33ERM...
Replies
10
Views
379
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
124
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
489
Back
Top Bottom