round 2
I apologize if I didn't get all of the questions answered. I wasn't sure what you meant with all possible sequences for those events.
The array has 21 fields, of those the ST is only filling the basic 10 fields. When it's left blank.
I'm using the TCP Socket AOI from Rockwell, the output of that connection is fed into a string variable called LastRead.
LastRead contains a 40+ character string.
Mid > CurrentSequenceString STOD > CurrentSequence
Mov CurrentSequence > 1stShift[CurrentSequence].CarcassCount
From there I'm using MOV's to fill in the rest of the data parsed from that initial string.
I'm going to try and answer the when, though I'm not sure it's the answer you are looking for;
the vendor network connection, once the socket is opened it listens until data is passed.
the PLC string-parsing code- on change it parses the data. There's not a temporary structure, or anything like it. It literally passes the info to the array on each scan until it changes.
the PLC ST code, always running
the .NET application- every two minutes.
I apologize if I didn't get all of the questions answered. I wasn't sure what you meant with all possible sequences for those events.
The array has 21 fields, of those the ST is only filling the basic 10 fields. When it's left blank.
I'm using the TCP Socket AOI from Rockwell, the output of that connection is fed into a string variable called LastRead.
LastRead contains a 40+ character string.
Mid > CurrentSequenceString STOD > CurrentSequence
Mov CurrentSequence > 1stShift[CurrentSequence].CarcassCount
From there I'm using MOV's to fill in the rest of the data parsed from that initial string.
I'm going to try and answer the when, though I'm not sure it's the answer you are looking for;
the vendor network connection, once the socket is opened it listens until data is passed.
the PLC string-parsing code- on change it parses the data. There's not a temporary structure, or anything like it. It literally passes the info to the array on each scan until it changes.
the PLC ST code, always running
the .NET application- every two minutes.
I'm assuming you mean emulate, but both logix 5000 and emulate are paid versions.BachPhi Is it the free or the paid version??
1. What are the differences between Emulate and Production?
1.1. For example, is the .NET process reading these data running against the Emulate system?
No, the .net process doesn't. The emulated process uses a timer to fill only the plant id into a constantly changing sequence field. Ie. Timer every 5 seconds increments the sequence +1, the next step is adding a Array[sequence].plantid = 4010.
When the sequence has gotten to 10, I use a move statement to change the sequence to 20 (that way 11-19 will be skipped- leaving them as all 0's. The ST then runs through the loop filling the plantid)
2. How do you know the PLC code did not see the plant id <> 4010 when in Production? Was it
2.1. EITHER because you monitored the records plant id values in the PLC memory array, while online with the PLC, and visually confirmed they had not been converted to 4010 even though the ST program was running,
2.2. OR because the .NET application stopped, perhaps with a warning message that it found an invalid plant id value of 0,
It's more of a reactive situation. There's a department that waits on that information to be transferred for billing. If they don't see an expected total they reach out to see if there was an issue. Usually, I can run a report against the values stored in SQL to find the last good count. Goto the PLC, look at the next array sequence and it's completely filled with 0's.
Ie. Billing calls- we only have 10 carcasses in the system, I check array[11] is filled with 0's, but array[12] is fine. (The .net process verifies that all required fields are there before accepting, so there's a log- but it only shows the last accepted value that serves as a placeholder for starting the next cycle.) I can manually fill the record in, so that the .net process can continue or wait until end of shift and send all the data. That's what I was hoping to use the ST for in this scenario of filling in the "required" fields and carrying on.
I'm sending you a pm as well.