Obsidean_VM/EXTRA/06-BARILA AMES - PROCOMAC M.../Explain to - Generated by M...

3.3 KiB

https://www.plctalk.net/threads/slc-500-to-controllogix-indirect-conversion-with-1403-nsc.101631/

Are there any "PCE" (Possible Conversion Error) or "Unknown" instructions after the conversion and if so, have you been working through them to convert the logic to compatible Logix programming?

Your N Integer Data Files should have been converted to DINT arrays...

Example:

N7 with 100 elements ==> tagname "N7" data type DINT[100]

N7:0 element ==> N7[0]

N7:0/5 bit ==> N7[0].5

Indirect Addresses...

Data Files do not exist in the tag based Logix controllers so there are no longer Data File numbers to reference indirectly. As the conversion tool cannot convert an indirect file number reference a PCE instruction is added on the rung to point this out.

Example:

Your aforementioned N[N12:0]:3 is an indirect reference to N12:0 for the file number Nx:3. This will not convert.

The Data File N12 will have been converted to a DINT array "N12". Also, any indirect references to elements within N12 will have been created as an alias, so "N12:0" becomes alias "N12_0" to the new array element. So you can still use the new N12[0] or N12_0 alias as your pointer. However, the addressing of the indirection will now have to be converted to Logix programming.

All Nx Data Files are now Nx DINT arrays with the equivalent number of elements. Some of these arrays now represent the different N file numbers that N12:0 was pointing to.

The SLC indirection syntax would allow N[xx:x]:x as a valid file number reference, but because the new arrays are referenced by a tagname, such as "N7", you cannot just indirectly reference the "7" any more. The whole tagname would have to be referenced. So feeding a number into the new N12_0 pointer will not work as it is now an alphanumerical string you are dealing with in the tagname.

As Ken has mentioned, the best way to convert numerical indirection is to create a 2 dimensional array which will reinstate numerical references to point to using the original pointer.

Example:

SLC...

N7 = 5 elements N7:0 - N7:4
N8 = 5 elements N8:0 - N8:4
N9 = 5 elements N9:0 - N9:4

N12:0 = pointer to 7, 8, 9

Logix...

N7 = DINT[5] array
N8 = DINT[5] array
N9 = DINT[5] array

N12_0 = alias pointer to 0, 1, 2

Tag "FileNumber" = DINT[3,5] (2 dimensional array)

FileNumber = [3 x array members,5 x elements deep]...

2D_Array_Indirection.bmp

So now, to indirectly point to any of those elements, you can use the N12_0 pointer as follows...

Example:

N12_0 = 0

FileNumber[N12_0, 0] = FileNumber[0,0] ...which represents the new N7:0

N12_0 = 1

FileNumber[N12_0, 2] = FileNumber[1,2] ...which represents the new N8:2

N12_0 = 2

FileNumber[N12_0, 4] = FileNumber[2,4] ...which represents the new N9:4

Here is a couple of basic examples that have verified...

Example_Logix_Indirection.bmp

Of course, the new tagnames do not have to remain as N anything. You can rename them to more meaningful tagnames if you wish.

There are always a few gotchas with these conversions so if anything is unclear or you need more help then ask away.

Regards,
George