Logic code definitions

The following table lists each logic code with its related information.

Logic Code

IEC Type

Power Operation Data Type

Register Definition

Scaled Required?(register or fixed)

Device Specific?

Notes

READS

 

Invalid Block

(L:P:0)

IB

LONG

Up to 1,000 sequential registers

No

Generic only

Defines invalid blocks of memory in the device. The driver does not include these registers in block reads.

Date / Time
(L:P:1)
(3 register)

UT

LONG

3 sequential registers

No

Generic – if it fits

Register N:

High byte = Month 1–12
Low byte = Day 1–31

Register N+1:

High byte = Year 0–199 (+1900)

Low byte = Hour 0–23

Register N+2:

High byte = minutes 0–59
Low byte = seconds 0–59

Date / Time
(L:P:2)
(6 register)

UT

LONG

6 sequential registers

No

Generic

– if it fits

Register N: Seconds 0–59

Register N+1: Minutes 0–59

Register N+2: Hours 0–23

Register N+3: Day 1–31

Register N+4: Month 1–12

Register N+5: Year 0–199 (+1900)

Date / Time
(L:P:3)
(3 or 4 register --Circuit Monitor/
Power Meter)

UT

LONG

3 or 4 sequential registers

No

CM/PM

Register N:

High byte = Month 1–12,
Low byte = Day 1–31

Register N+1:

High byte = Year 0–199 (+1900)

Low byte = Hour 0–23

Register N+2:

High byte = minutes 0–59
Low byte = seconds 0–59

Register N+3:

msec = 0–999 (unused)

Date / Time
(L:P:4)
(3 or 4 registers SEPAM)

UT

LONG

3 or 4 sequential registers

No

SEPAM

Register N:

Bits 0–6 = Year: 0 –70 (2000– 2070)

71 – 99 (1971–1999)

Register N+1:

Bits 8-11 = Month

Bits 0-4 = Day

Register N+2:

Bits 8-12 = Hour

Bits 0-5 = Minutes

Register N+3: msec = 0-59,999
(seconds are ms/1000)

Date/Time

(L:P:5)

3-register Micrologic

UT

LONG

3 sequential registers

No

micro

Register N:

High byte = Month 1–12,
Low byte = Day 1–31

Register N+1:

High byte = Year 0–69 (+2000), Year 70–99 (+1900)

Low byte = Hour 0–23

Register N+2:

High byte = minutes 0–59
Low byte = seconds 0–59

Date/Time

(L:P:6)

4-register Micrologic

UT

LONG

4 sequential registers

No

micro

Register N:

High byte = Month 1–12,
Low byte = Day 1–31

Register N+1:

High byte = Year 0–69 (+2000), Year 70–99 (+1900)

Low byte = Hour 0–23

Register N+2:

High byte = minutes 0–59
Low byte = seconds 0–59

Register N+3:

msec = 0–999 (unused)

Date/Time

(L:P:7)

3-register Argos

UT

LONG

3 sequential registers

No

Argos

The number of seconds since 01/01/2000 (00:00:00)

register 1 = MSB

register 2 = LSB

register 3 = milliseconds

Date/Time

(L:P:8)

4-register IEC 870-5-4

UT

LONG

4 sequential registers

No

generic

Register N:

Bits 0–6 = Year: 0 –127 (2000– 2127)

Register N+1:

Bits 8-11 = Month

Bits 0-4 = Day

Register N+2:

Bits 8-12 = Hour

Bits 0-5 = Minutes

Register N+3: msec = 0-59,999
(seconds are ms/1000)

Modulo 10k
(L:P:10)

BC

STRING

Up to 4 registers

No

generic

Result is a string representation.

Range is 0 to 9,999,999,999,999,999

Each register has a range of 0 to 9,999

Result is:
– R4*10,000^3 + R3*10,000^2 + R2*10,000 + R1

Modulo 10k Val

(L:P:11)

BC

REAL

Up to 4 registers

No

generic

Result is a string representation.

Range is 0 to 9,999,999,999,999,999

Each register has a range of 0 to 9,999

Result is:
– R4*10,000^3 + R3*10,000^2 + R2*10,000 + R1

NOTE: This logic code (and all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

Modulo 10k Energy

(L:P:12)

BC

STRING

Up to 4 registers

No

generic

Result is a string representation.

Range is 0 to 9,999,999,999,999.9

Each register has a range of 0 to 9,999

Result is
– (R4*10,000^3 + R3*10,000^2 + R2*10,000 + R1)/1000

Modulo 10k Energy Val

(L:P:13)

BC

REAL

Up to 4 registers

No

generic

Result is a string representation.

Range is 0 to 9,999,999,999,999.9

Each register has a range of 0 to 9,999

Result is
– (R4*10,000^3 + R3*10,000^2 + R2*10,000 + R1)/1000

NOTE: This logic code (and all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

PL Digital Input SS

(L:P:20)

SS

LONG

2 registers

No

CM/PM

First register (100–199 inclusive) indicates that this is a digital input register.

Second register is masked to test for either one 1 or one 0.

Result is: 0 = off and 1 = on.

This result can be inverted.

PL Digital Input DS

(L:P:21)

DS

LONG

2 registers

No

CM/PM

Same as PL Digital Input SS except:

Result is 0 = intermediate, 1 = off, 2 = on, 3 = bad-state.

Inversion will invert only off and on states.

PL Digital Input TF

(L:P:22)

SS

DIGITAL

2 registers

No

CM/PM

Same as PL Digital Input SS except:

Result is: 0 = false and 1 = true.

This result can be inverted.

PL Digital Output SS

(L:P:23)

SS

LONG

2 registers

No

CM/PM

First register (200–299 inclusive) indicates that this is a digital output register.

Second register is masked to test for either one 1 or one 0.

Result is: 0 = off and 1 = on.

This result can be inverted.

PL Digital Output DS

(L:P:24)

DS

LONG

2 registers

No

CM/PM

Same as PL Digital Output SS, except:

Result is:
0 = intermediate, 1 = off, 2 = on, 3 = bad-state.

Inversion will invert only off and on states.

PL Digital Output TF

(L:P:25)

SS

DIGITAL

2 registers

No

CM/PM

Same as PL Digital Output SS except:

Result is: 0 = false and 1 = true.

This result can be inverted.

Status SS
(L:P:26)

SS

LONG

Up to 4 registers

No

Generic

Each register is compared to a ones’ mask. Optionally it can be compared to a zeros’ mask. (Use the Edit Address screen in the Profile Editor to create masks for the user.)

Result is: 0 = off and 1 = on.

If there is only one register, the result can be inverted.

Status OR SS

(L:P:226)

SS

LONG

2 to 4 registers

No

Generic

Each register is compared to a ones’ mask. These results are OR’ed together. Optionally, it can be compared to a zeros’ mask. (Use the Edit Address screen in the Profile Editor to create masks for the user.)

Result is: 0 = off and 1 = on.

Status DS
(L:P:27)

DS

LONG

Up to 4 registers

No

Generic

Same as Status SS except:

Result is: 0 = intermediate, 1 = off, 2 = on, 3 = bad-state.

Inversion will invert only off and on states.

Status OR DS

(L:P:227)

DS

LONG

2 to 4 registers

No

Generic

Same as Status OR SS except:

Result is: 0 = intermediate, 1 = off, 2 = on, 3 = bad-state.

Status TF
(L:P:28)

SS

DIGITAL

Up to 4 registers

No

Generic

Same as Status SS except:

Result is: 0 = false and 1 = true.

This result can be inverted.

Status OR TF

(L:P:228)

SS

DIGITAL

2 to 4 registers

No

Generic

Same as Status OR SS except:

Result is: 0 = false and 1 = true.

Status Int
(L:P:29)

BC

LONG

1 register

No

CM/PM

One register is bit anded with one mask. The result will be an integer that can be used to choose the appropriate enumeration.

Status Enumeration

(L:P:229)

EN

LONG

1 to 4 registers

No

Generic

Each register is compared to a ones’ mask. Optionally it can be compared to a zeros’ mask. (Use the Edit Address screen in the Profile Editor to create masks for the user.)

Result is a combination of the results for each register, using this formula:

result for register 1 * 2^0 + result for register 2 * 2^1 +
result for register 3 * 2^2 + result for register 4 * 2^3

PL Analog Input

(L:P:30)

MV/CM

REAL

3 registers

No

CM/PM

First register (300–399 inclusive) indicates that this is an analog input register.

Second register is treated as a signed value.

Third register can contain a value from –3 to 3 and will be used to scale the second register (R2*10^R3).

NOTE: This logic code (and all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

Breaker Rack Status

(L:P:230)

EN

LONG

2 to 3 registers

No

Generic

Register 1 = breaker racked in

Register 2 = breaker racked out

Register 3 = breaker in test (optional)

Results:

0 = racked in

1 = racked out

2 = test

3 = error

4 = in between positions

PL Analog Output

(L:P:31)

MV/CM

REAL

2 registers

No

CM/PM

First register (400–499 inclusive) indicates that this is an analog output register.

Second register is treated as a signed value.

NOTE: This logic code (and all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

Scaled Register Signed

(L:P:32)

MV/CM

REAL

1 or 2 registers

Either

(optional)

Generic

For a single register: treated as a signed value from
–32,767 to +32,767. (-32768 will result in a NA)

For two registers: the registers will be concatenated together, the first register filling bits 16–32 and the second register filling bits 0–15. Values will range from

–2,147,483,648 to –2,147,483,647.

Values can be scaled using a fixed scale or a scale register.

NOTE: This logic code (and all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

Scaled Register Unsigned

(L:P:33)

MV/CM

REAL

1 to 4 registers

Either

(optional)

Generic

For a single register: treated as an unsigned value from 0 to 65,535.

For two registers: the registers will be concatenated together, the first register filling bits 16–32 and the second register filling bits 0–15. Values will range from

0 to 4,294,967,295.

Values can be scaled using a fixed scale or a scale register.

NOTE: This logic code (and all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

Scaled Register Signed No NA

(L:P:34)

MV/CM

REAL

1 or 2 registers

Either

(optional)

Generic

Same as Scaled Register except that a single register with value -32768 is acceptable and will be reported as such.

NOTE: This logic code (and all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

Scaled Register Signed SEPAM A

(L:P:35)

MV/CM

REAL

2 registers

Either

(optional)

Generic

Same as Scaled Register except that 0xFFFFFFFF or 0x00007FFF will be NA.

NOTE: This logic code (and all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered

accurate.

Scaled Register Signed SEPAM B

(L:P:36)

MV/CM

REAL

2 registers

Either

(optional)

Generic

Same as Scaled Register except that 0xFFFFFFFF will be NA.

NOTE: This logic code (and all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

IEEE 32 Real

(L:P:37)

MV/CM

REAL

2 sequential registers

No

Generic

Uses the IEEE standard for floating-point arithmetic (IEEE 754);

register 1 is MSB, register 2 is LSB

NOTE: This logic code (and all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

Scaled Register Signed SEPAM 2000 Format B

(L:P:38)

MV/CM

REAL

1 register

Either

(optional)

Generic

For a single register: treated as a signed value from
–32,767 to +32,767:

From the value of the unsigned register, subtract 32768; then apply the scale.

0000 or FFFF will be NA.

NOTE: This logic code (and all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

PL String
(L:P:39)

ST

STRING

1 to 10 sequential registers

No

Generic

Each register can represent up to two ASCII characters.

Sum Registers (L:P:40)

MV/CM

REAL

1 to 4 registers

Either

(required)

Generic

Result is:

R1 + … + Rn * 10^scale

NOTE: This logic code (and all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

Divide Registers

(L:P:41)

MV/CM

REAL

3 registers

Either

(required)

Generic

Result is:

R1/R2 * R3 * 10^scale

If R2 is zero, result will be #COM

NOTE: This logic code (and all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

Multiply Registers

(L:P:42)

MV/CM

REAL

1 to 4 registers

Either

(required)

Generic

Result is:

R1 * … * Rn * 10^scale

NOTE: This logic code (and all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

Average Registers

(L:P:43)

MV/CM

REAL

1 to 4 registers

Either

(required)

Generic

Result is:

Avg(R1 … Rn) * 10^scale

NOTE: This logic code (and all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

Average Registers WF

(L:P:44)

MV/CM

REAL

2 to 4 registers

Either

(required)

Generic

Result is:

Avg(R1 … Rn-1) * Rn * 10^scale

NOTE: This logic code (as with all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

Sum with Scale

(L:P:45)

MV/CM

REAL

2 registers

Either

(required)

CM/PM

Result is:

(R1 * 10^scale) + R2

NOTE: This logic code (as with all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

Sum with Scale Unsigned
(L:P:46)

MV/CM

REAL

2 registers

Either

(required)

CM/PM

Result is same as previous, except unsigned.

NOTE: This logic code (as with all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

Vector Math

(L:P:47)

MV/CM

REAL

2 registers

Either (required)

Generic

Result is:

sqrt (R1^2 + R2^2) x scale

NOTE: This logic code (as with all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

Vector Math IEEE

(L:P:48)

MV/CM

REAL

4 registers

Either (required)

Generic

Result is:

sqrt ([R1 R2]^2 + [R3 R4]^2) x scale

where [ ] indicates IEEE32 representation

NOTE: This logic code (as with all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

Multiply Registers 32-bit

(L:P:49)

MV/CM

REAL

3 or 4 registers

Either (optional)

Generic

Result is:

[R1R2] * [R3(R4)],

meaning Regs 1 and 2 are a 32 bit number.

The number is multiplied by Reg 3 (if 16 bit) or Reg 3 and 4 (32 bit number)

NOTE: This logic code (and all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

CM4 Power Factor IEEE

(L:P:50)

MV/CM

REAL

1 register

No

CM4

Returns the IEEE power factor.

PM8 Power Factor IEEE

(L:P:51)

MV/CM

REAL

1 register

No

PM8

Returns the IEEE power factor (converted from IEC mode as necessary).

The device may be in IEEE or IEC mode if the device firmware version is 11.6 or higher. If the device firmware version is below 11.6, IEC mode is not supported.

NOTE: This logic code (as with all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

SP40 Power Factor IEEE

(L:P:52)

MV/CM

REAL

1 register

No

SEPAM 40

Returns the IEEE power factor (converted from IEC mode).

NOTE: This logic code (as with all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

ML Power Factor IEEE

(L:P:53)

MV/CM

REAL

2 registers

No

ML

Returns the IEEE power factor (converted from IEC mode as necessary).

The second input register must be the associated Reactive Power for the Power Factor requested.

NOTE: This logic code (as with all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

Generic Power Factor

(L:P:54)

MV/CM

REAL

2 registers

No

Generic

R2/sqrt (R2^2 + R1^2)

where:

R2 = real power
R1 = reactive power

NOTE: This logic code (as with all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

Generic Power Factor - IEEE32 variation

(L:P:55)

MV/CM

READ

4 registers

No

Generic

[R3 R4]/

sqrt ([R3 R4]^2 + [R1 R2]^2)

where:

R3 = real power IEEE32 MSR

R4 = real power IEEE32 LSR
R1 = reactive power IEEE32 MSR

R2 = reactive power IEEE32 LSR

SP2000 Power Factor IEEE

(L:P:56)

MV/CM

REAL

1 register

No

SEPAM 2000

Returns the IEEE power factor (converted from IEC mode).

NOTE: This logic code (as with all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

Scaled Register Signed 64-bit

(L:P:57)

MV/CM

REAL

4 registers

Either

(optional)

Generic

Reads a 64-bit signed integer and returns a REAL value.

NOTE: This logic code (as with all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

Power Factor IEEE

(L:P:58)

MV/CM

REAL

2 registers

No

Generic

Takes a 4 quadrant power factor (IEEE32 real) and returns an IEEE power factor.

IEEE 64-bit double

(L:P:59)

MV/CM

REAL

4 registers

No

Generic

Uses the IEEE standard for floating-point arithmetic (IEEE 754); returns the value as 32-bit REAL.

NOTE: This logic code (as with all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

IEEE 64-bit double

(L:P:60)

MV/CM

STRING

4 registers

No

Generic

Uses the IEEE standard for floating-point arithmetic (IEEE 754); returns the value as 64-bit STRING.

NOTE: This logic code (as with all REAL logic codes) has an accuracy of 15 digits. Anything longer than 15 digits should not be considered accurate.

WRITES (these are write-only; see below for Read/Write codes)

NOTE: If the device is capable of preventing (blocking) writes to its registers, verify that the "block" feature is disabled before you implement the write.

Status Write Register

(L:P:101)

SS

LONG

1 register

No

Generic

If you input 1 to this tag it will write the MASK value to the register.

Status Write Register AND

(L:P:102)

SS

LONG

1 register

No

Generic

If you input 1 to this tag it will read the register and AND the MASK with the register (This puts a 0 wherever there is a 1 in the mask and leaves the rest alone).

Status Write Register OR

(L:P:103)

SS

LONG

1 register

No

Generic

If you input 1 to this tag it will read the register and OR the MASK with the register (This puts a 1 wherever there is a 1 in the mask and leaves the rest alone).

Write Register Unsigned

(L:P:110)

MV/CM

REAL

1 register

Either

Generic

This will take the input value read in and divide out the scale factor and the conversion factor. It will then round to the nearest whole number and if it is a value from 0 to 65535 it will put this value in the register.

NOTE: This logic code (and all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

 

Write Register Signed

(L:P:111)

MV/CM

REAL

1 register

Either

Generic

This will take the input value read in and divide out the scale factor and the conversion factor. It will then round to the nearest whole number and convert the signed value to an unsigned value from 0 to 65535. It will put this value in the register.

NOTE: This logic code (and all REAL logic codes) has an accuracy of seven digits. Anything longer than seven digits should not be considered accurate.

READ/WRITES

Read/Write Holding Register

(L:P:120)

MV/CM

LONG

1 register

No

Generic

You can write any value from 0 to 65535 and read an unsigned value from the same register.

Read/Write Coil Register

(L:P:121)

SS

DIGITAL

1 register

No

Generic

You can write 0 or 1 and read a value from the same register.

READ

Command Read Date/Time

(L:P:170)

CR

LONG

2 to 4 registers

No

MicrologicX

Register 1: <Command ID>:<Module>

Register 2: <Register>:<# of registers>

Register 3: <# of parameters>:<Parameter 1>

Register 4: <Parameter 2>:<Parameter 3>

If there are no parameters needed, omit registers 3 and 4.

All registers formatted as <Decimal>:<Hexadecimal>

Command Read IEEE32

(L:P:171)

CR

REAL

2 to 4 registers

Fixed

MicrologicX

Register 1: <Command ID>:<Module>

Register 2: <Register>:<# of registers>

Register 3: <# of parameters>:<Parameter 1>

Register 4: <Parameter 2>:<Parameter 3>

If there are no parameters needed, omit registers 3 and 4.

All registers formatted as <Decimal>:<Hexadecimal>

Command Read Scaled Signed

(L:P:172)

CR

REAL

2 to 4 registers

Fixed

MicrologicX

Register 1: <Command ID>:<Module>

Register 2: <Register>:<# of registers>

Register 3: <# of parameters>:<Parameter 1>

Register 4: <Parameter 2>:<Parameter 3>

If there are no parameters needed, omit registers 3 and 4.

All registers formatted as <Decimal>:<Hexadecimal>

Command Read Scaled Unsigned

(L:P:173)

CR

REAL

2 to 4 registers

Fixed

MicrologicX

Register 1: <Command ID>:<Module>

Register 2: <Register>:<# of registers>

Register 3: <# of parameters>:<Parameter 1>

Register 4: <Parameter 2>:<Parameter 3>

If there are no parameters needed, omit registers 3 and 4.

All registers formatted as <Decimal>:<Hexadecimal>

COMMAND READ/ WRITE

PL String

(L:P:175)

CR STRING 1 to 40 Sequential Registers No HDPM

Register 1: <Channel Name/Rack ID>:<Module>

Register 2: <Starting Register Address>:<Number of Sequential Registers>

NOTE: Module value will be 0. This logic code is used for command read and write value to Circuit label and Rack ID of HDPM Device.

Date/Time

(L:P:176)

UT LONG 2 Sequential Registers No HDPM

Register 1: Least Significant Bit.

Register 2: Most Significant Bit

NOTE: This logic code read the value in Epoc Format. (The resulting value will be represented in seconds.)