a real use for the S:24 bit.

this is WAY up there on the Weird-O-Meter ...

DISCLAIMER: THE CONCLUSIONS BELOW ARE BASED ON THE "STRIPPED DOWN" PROGRAM WHICH WAS POSTED ... HAVING THE FULL PROGRAM AVAILABLE MIGHT LEAD TO DIFFERENT CONCLUSIONS ...

first of all, this appears to be a program from an SLC processor (SLC-5/03 or higher) which has somehow been "shoehorned" into a MicroLogix 1000 ...

the program makes use of data files which do not even exist ... (example: F10 and F205 – among many others) ... it's impossible to track down how the data is intended to be used – when the data doesn't actually exist ... we need the "real" file in order to nail everything down ...

another weirdness is that Ladder #16 (which incidentally DOES contain some pretty important looking code) is set up as a "Debug" file ... debug files like this do not get downloaded to the processor – and so the JSR which would try to call the "Debug" file would generate a runtime fault ... what's going on here? ...

another weirdness ... someone has apparently tried to program an STI (Selectable Timed Interrupt) operation in Ladder #4 ... their use of the STS instruction for this purpose is VERY unorthodox ... personally, I've been working with PLCs for over 20 years and this is the FIRST time I've ever seen this type of instruction used ... in fact, I had to read the "book" to get an idea of what it does – and frankly I think that the "book" has an error in it ...

specifically, consider the phrase:

"At the same time [TRUE execution], the STI timer is reset and begins timing: at timeout, the STI subroutine executes."

my initial tests show that the wording should be corrected along these lines:

"Each time the STS instruction is executed as TRUE, the STI timer is reset. When the rung goes FALSE, the STI timer begins timing. At timeout, the STI subroutine begins executing at its specified rate."

specifically, as long as the STS rung stays TRUE, I was unable to get the STI to execute at all ... (disclaimer: I haven't completely tested this as far as I want to – but I'm 99% sure that my conclusions are correct) ...

also, someone has programmed STE and STD instructions WITHIN the STI file itself ... I've got a hunch this isn't going to work either ... I'll test it later as time permits ...

note that Rung #3 in Ladder #2 has a JSR instruction to "call" Ladder #4 (the would-be STI file) ... the XIC on this rung uses an undocumented bit B14/150 which is apparently not controlled by anything in the program ... I'm just GUESSING here – but possibly when the programmer couldn't get the STI to function properly, this rung was added as a "temporary" patch which could be manually toggled on or off for testing/debugging purposes ...

now on to the S:24 concerns that initiated this thread in the first place ...

DISCLAIMER: THE CONCLUSIONS BELOW ARE BASED ON THE "STRIPPED DOWN" PROGRAM WHICH WAS POSTED ... HAVING THE FULL PROGRAM AVAILABLE MIGHT LEAD TO DIFFERENT CONCLUSIONS ...

as near as I can tell, the only things in this program which could have left S:24 at a value of "3" would be the FFL located in Ladder #20 – or the matching FFU – also located in Ladder #20 ...

this FFL and FFU arrangement is apparently being used to track data which is taken from zones "prior to" or "after" a piece of Minster machinery ... I'd bet significantly more than pocket change that this FFL/FFU setup caused the value of "3" to be left in S:24 ...

there are quite a few COP instructions in this program which also make use of (and could alter) the value stored in S:24 ... based on what has been posted, all of the COP instructions are either:

(1) not being executed (due to the faulty STI arrangement) ... or ...

(2) being executed only on the First Pass of the processor when it enters the Run mode ...

moreover, a COP instruction will normally return S:24 back to a value of "0" at the end of its execution ...

conclusion: none of the COP instructions were responsible for the "3" value of S:24 which has been causing concern ...

the only other obvious use of S:24 is apparently in numerous MUL instructions ... one example (shown below) is the MUL located on Rung #6 of Ladder #17 ... note that I am unable to fully track the operation of these MUL operations since the data that they use does not exist in the data tables of this "stripped down" program ... specifically, F10:19 and F205:0 do not exist – and therefore I can't tell exactly how the original program made use of these locations ...

at this point, my best GUESS is that:

(1) the "#" characters denoting Indexed Addressing (using S:24) were entered by mistake at some point in the past ... or ...

(2) that the "#" characters were (or still are) part of an attempt to have the MUL operations "track" simultaneously with the data being handled by the FFL and FFU operations ...

note that the same basic pattern of MUL instructions is present at:

Rung #6 - Ladder #15 ...
Rung #6 - Ladder #16 ...
Rung #6 - Ladder #17 ...
Rung #6 - Ladder #18 ...
Rung #6 - Ladder #19 ...

this is a recurring pattern which makes reference to "INVERTED REFERENCE" for each of several "punches" ... it's very interesting that SOME of the addresses used in these MUL instructions have the "#" character – but then other corresponding addresses do NOT ...

once again, I can't tell for sure what's going on here without seeing the original program ...

DISCLAIMER: THE CONCLUSIONS ABOVE ARE BASED ON THE "STRIPPED DOWN" PROGRAM WHICH WAS POSTED ... HAVING THE FULL PROGRAM AVAILABLE MIGHT LEAD TO DIFFERENT CONCLUSIONS ...

this is the best I can do with the material I have to work with – and with the time that I can devote to the project ... I'll be teaching next week so my future participation will be extremely limited ... hopefully what I've put forward here might be helpful to others who can dig deeper and come up with some useful suggestions ...

party on ...

.

S24_Errors_2.jpg
 
Wow!
Many thanks to Ron, for his time and interest.

I can't upload the actual file due to company policies.

The "oddities" are the direct result of converting the processor from a SLC 5/04 to an Ml1000.

I only have RsLogix micro starter at home. I wanted a way to look at logic from home, to try and help the off shift guys. ie. I don't want to go back to work if I don't have to.

Ron brings up a lot of good points. I haven't had the chance to explore any of them.

As of now,the line has been running nonstop without incident.
By weeks end I plan to follow the integrators advice and remove the # from the affected files and remove my mov statement.

Many Thanks.
 
You will not be able to remove the # from the FIFO address specified in the FFL instruction in ladder 20. RSLogix will not allow it.
 
Thanks Alaric.
The rungs in I am talking about are only related to the original problem.
specifically
lad/rung
Wow I can't tell you. My slaughtered ML1000 program doesn't show them.
I guess indirect addressing isn't supported.
At work on the "real deal" it is in ladders 15-19. All the files dealing with punch adjustment.
thanks for responding.
 

Similar Topics

The topic of reading or writing floating-point values via Modbus seems to come up regularly, and it is to my mind not that difficult. That said...
Replies
0
Views
1,392
Hello, First, please excuse my question I am new to Modbus. I have a CX-5140 control unit from Beckhoff and an instrumentation device that...
Replies
3
Views
3,127
I am having problems expressing an ANALOG OUTPUT 16bit INT word (0-10V Proportional Valve Voltage) as a REAL decimal number. From my...
Replies
6
Views
9,181
DearAll, I have a problem in coverting 48bit integer to Real.Kindly see the details as below System:- compactlogix L43 With MVI69-MCM...
Replies
1
Views
1,702
Dear sir, There is a level data coming from another station, and it is REAL. This data should transfer another station over my redundant (414-4H)...
Replies
11
Views
2,880
Back
Top Bottom