Integer in brackets...

Simple answer : Indirect addressing.

Takes the value of the address in the brackets, and makes a new address from it.

Nxx:[Nyy:zz]
If xx = 10, yy = 11, and zz=12

N10:[N11:12]
Now say the value in N11:12 = 15,
The new address would be N10:15.
 
The "Display Value for Indirect Address" can be misleading though, especially if you are rapidly using an index to loop through a routine.

Indirect address is nice for saving memory and having to duplicate code, but it can get out of hand too. Some of the older PLC5 systems on our site have 3 or 4 levels of indirect addressing, it makes it a pain to troubleshoot and modify if any changes are required. Also requires we use spreadsheet...
 
In addition to the comments on indirect addressing, that appears to be a For/Next loop - a common construct in computer programming. Notice the LBL (label) instruction on rung 017. Rung 018 increments the value of the indirects (also called pointers) N9:33 and N9:34 by 1. Chances are there is a comparison instruction followed by JMP instruction somewhere within a few rungs below that jump the program back to the label. The compare/JMP pair will determine how many iterations the loop makes.
 
Last edited:
The "Display Value for Indirect Address" can be misleading though, especially if you are rapidly using an index to loop through a routine.

Indirect address is nice for saving memory and having to duplicate code, but it can get out of hand too. Some of the older PLC5 systems on our site have 3 or 4 levels of indirect addressing, it makes it a pain to troubleshoot and modify if any changes are required. Also requires we use spreadsheet...

Sounds like job protecting measure more than anything that really has any function. What is your view on subject?
 
Yes there is a compare after the jump. This is a fault routine for an electrostatic painting process. I’m trying to understand this routine for troubleshooting purposes. The applicator for the spaying device is supposed to go to a certain position if it gets a HT (High Voltage) error (This way it does not ruin product). This error flags a bit in the PLC, which comes from the HT unit.

I will keep at it until I see the bigger picture…

Thanks for all the input.

 
If I were to venture a guess based on only what I can see in the picture this appears to be a bit field redistribution loop where bit 1 of each of a series of consecutive words in a file is copied into the bits of a single word. It appears to possibly be doing something like this:
attachment.php
 
Sounds like job protecting measure more than anything that really has any function. What is your view on subject?

We do have legitimate memory issues on the older PLC5s. If we didn't have the indirecting on those, the programming wouldn't fit onto the PLC at this point in time. Then again, I would have programmed the system a bit differently.

However the PLCs are for biopharma, and everything is GMP and validated / qualified. Having to upgrade a PLC is a huge issue because of the documentation, testing, and downtime involved, even if it is a simple as getting more memory (sometimes I feel like I spend more time updating specs, writing documents, and talking about things than I do actually doing any real work).

In any case, the PLC5s are like 10 years old. I am sure there was lots of discussion about how to develop a programming architecture that was flexible and would last a long time. From what I understand from the other engineers who were around at the time, they never thought at the time they would run out of memory. Whoops.

In some cases I do think (contractors in particular?) people might be motivated to make something overly complex for job security, but I don't think this particular case was driven by such motives.

The complexity was likely a result of trying to make something generic and in the interest of saving space. I think there may have been an easier way to do it but I wasn't there at the time...

All that said, I have been one of the engineers involved in upgrading systems to a ControlLogix platform. The difference between the two versions of our code are night and day. A lot of out programs are designed to be S88 aware / compliant and SFCs are really great in this regard.
 
Odd. I can see it.
Lets try that again. Can you see it now?

If I were to venture a guess based on only what I can see in the picture this appears to be a bit field redistribution loop where bit 1 of each of a series of consecutive words in a file is copied into the bits of a single word. It appears to possibly be doing something like this:

A061611-01.JPG
 

Similar Topics

Hi. I'm using a Modbus ProSoft where I basically map data to a big INT array. Example, where GX_I_63HPU is a REAL, MNETC.DATA.WriteData[200] an...
Replies
21
Views
425
Good morning all, I'm integerating a device with a Rockwell PLC with V34 Studio 5000. The device reports error codes using a single integer to...
Replies
19
Views
1,282
Ex If I Read from Integer file N7:0 N7:0 is an 8 point input card , input 0 and 2 are on , rest off When I look at : N7:0 -7 6 5 4 3 2 1 0 I...
Replies
5
Views
742
The analog array has 16 individual bits and each bit is an alarm. SCADA is having issues getting the BIT bool value. However they can get the...
Replies
9
Views
997
I set up a Mitisubishi test system on the bench. Q03UDSPU Q173DCPU MR-J3-40B HF-KP43 HMI is a LS XP50 TTA/KP43 I am trying to use a signed...
Replies
1
Views
394
Back
Top Bottom