![]() |
Tani OpcPipe protocol
1.0.5
Tani OpcPipe protocol
|
PLC independant constants. More...
Macros | |
| #define | TYP_USE_UNSPECIFIED 0x00 |
| #define | TYP_USE_BIT 0x01 |
| bit arrays are formatted from lowest bit in byte without gaps | |
| #define | TYP_USE_INT8 0x02 |
| #define | TYP_USE_UINT8 0x03 |
| #define | TYP_USE_INT16 0x04 |
| #define | TYP_USE_UINT16 0x05 |
| #define | TYP_USE_INT32 0x06 |
| #define | TYP_USE_UINT32 0x07 |
| #define | TYP_USE_INT64 0x08 |
| #define | TYP_USE_UINT64 0x09 |
| #define | TYP_USE_STRING 0x0A |
| 32 bit length + data (allows embedded 0 chars); the length is not included in PLC_REQ::Count, memlen required is PLC_REQ::Count + 4 | |
| #define | TYP_USE_FLOAT32 0x0B |
| #define | TYP_USE_FLOAT64 0x0C |
| #define | TYP_USE_FLOAT128 0x0D |
| #define | TYP_USE_TIMESTAMP 0x0E |
| W_UINT64 seconds (unix time) + W_UINT32 nanoseconds. | |
| #define | TYP_USE_STRUCTURE 0x0F |
| #define | TYP_USE_RPC 0x10 |
| general function call | |
| #define | TYP_USE_FILE 0x11 |
| file object | |
| #define | TYP_USE_DIRECTORY 0x12 |
| directory object | |
| #define | TYP_USE_ENUMERATION 0x13 |
| always Int32 as base type | |
| #define | TYP_USE_MULTILANG_STRING 0x14 |
| Multilanguage string: 16 bit number of translations + n * (32 bit locale length + locale + 32 bit data length + data) | |
| #define | TYP_USE_TRIGGER_BIT 0xFFFF |
| #define | IsNumberType(f) ((((f) >= TYP_USE_INT8) && ((f) <= TYP_USE_UINT64)) || (((f) >= TYP_USE_FLOAT32) && ((f) <= TYP_USE_FLOAT128))) |
| #define | TYP_FLAGS_ENDIAN_MASK 0x000F |
| #define | TYP_FLAGS_ENDIAN_UNSPECIFIED 0x0000 |
| unknown endian value or cpu format | |
| #define | TYP_FLAGS_ENDIAN_1234 0x0001 |
| big endian format, is default | |
| #define | TYP_FLAGS_ENDIAN_4321 0x0002 |
| little endian format | |
| #define | TYP_FLAGS_ENDIAN_3412 0x0003 |
| wordswap big endian format | |
| #define | TYP_FLAGS_ENDIAN_2143 0x0004 |
| wordswap little endian format | |
| #define | TYP_FLAGS_ALWAYS_NEW 0x0010 |
| always send this value, even if it is equal to the previous one (e.g sync read on inactive item) | |
| #define | TYP_FLAGS_CREATE_ACTIVATED 0x0020 |
| immediately activate on create item | |
| #define | TYP_FLAGS_ARRAY 0x0040 |
| #define | TYP_FLAGS_BLOCKED 0x0080 |
| partial data, more data for same item follow; use only for sync read/write | |
| #define | TYP_FLAGS_BITARRAY_LEN_MASK 0x0700 |
| exact length of bit array (= number of used bits in last data byte); 0 = all 8 bits used | |
| #define | TYP_FLAGS_BITARRAY_LEN_SHIFT 8 |
| shift amount for TYP_FLAGS_BITARRAY_LEN_MASK | |
| #define | TYP_FLAGS_ERROR_IF_IMPOSSIBLE 0x0800 |
| Brings an error if the conversion may be impossible (e.g. -20 to unsigned) | |
| #define | TYP_FLAGS_ERROR_IF_WRONG_TYPE 0x1000 |
| Brings an error if any conversion is needed (e.g. 8-bit to 16-bit, even if the value would fit in) | |
| #define | TYP_FLAGS_ENDIAN_LOCAL_CPU TYP_FLAGS_ENDIAN_4321 |
| #define | PLC_AREA_RAW 0 |
| #define | PLC_AREA_DATABLOCK 1 |
| #define | PLC_AREA_FLAG 2 |
| #define | PLC_AREA_INPUT 3 |
| #define | PLC_AREA_OUTPUT 4 |
| #define | PLC_AREA_PERIPHERIE 5 |
| #define | PLC_AREA_COUNTER 6 |
| #define | PLC_AREA_TIMER 7 |
| #define | PLC_AREA_SYSTEMDATA 8 |
| #define | PLC_AREA_ABSOLUTE_MEMORY 9 |
| #define | PLC_AREA_EXT_DATABLOCK 10 |
| #define | PLC_AREA_INPUT_REG 11 |
| #define | PLC_AREA_OUTPUT_REG 12 |
| #define | PLC_AREA_PROTOCOL_STATUS 13 |
| special protocol informations | |
| #define | PLC_AREA_SYSINIT 14 |
| #define | PLC_AREA_ID 15 |
| #define | PLC_AREA_EXT_MEMORY 16 |
| #define | PLC_AREA_EXT_PERIPHERIE 17 |
| #define | PLC_AREA_PERIPHERIE_INPUT 18 |
| #define | PLC_AREA_PERIPHERIE_OUTPUT 19 |
| #define | PLC_AREA_EVENT_DATA 20 |
| #define | PLC_AREA_EVENT_ACK 21 |
| #define | PLC_AREA_ITEM_SYNTAX 22 |
| for symbolic PLCs: use Item syntax instead of symbol cache | |
| #define | PLC_AREA_COUNTER_COIL 100 |
| #define | PLC_AREA_COUNTER_CONTACT 101 |
| #define | PLC_AREA_TIMER_COIL 102 |
| #define | PLC_AREA_TIMER_CONTACT 103 |
| #define | PLC_AREA_RETENTIVE_TIMER_COIL 104 |
| #define | PLC_AREA_RETENTIVE_TIMER_CONTACT 105 |
| #define | PLC_AREA_RETENTIVE_TIMER 106 |
| #define | PLC_AREA_LONG_TIMER_COIL 107 |
| #define | PLC_AREA_LONG_TIMER_CONTACT 108 |
| #define | PLC_AREA_LONG_TIMER 109 |
| #define | PLC_AREA_LONG_COUNTER_COIL 110 |
| #define | PLC_AREA_LONG_COUNTER_CONTACT 111 |
| #define | PLC_AREA_LONG_COUNTER 112 |
| #define | PLC_AREA_LONG_RETENTIVE_TIMER_COIL 113 |
| #define | PLC_AREA_LONG_RETENTIVE_TIMER_CONTACT 114 |
| #define | PLC_AREA_LONG_RETENTIVE_TIMER 115 |
| #define | PLC_AREA_INDEX_REGISTER 116 |
| #define | PLC_AREA_FILE_REGISTER_SERIAL 117 |
| #define | PLC_AREA_LINK_REGISTER 118 |
| #define | PLC_AREA_SPECIAL_RELAY 119 |
| #define | PLC_AREA_LATCH_RELAY 120 |
| #define | PLC_AREA_ANNUNCIATOR 121 |
| #define | PLC_AREA_EDGE_RELAY 122 |
| #define | PLC_AREA_LINK_SPECIAL_RELAY 123 |
| #define | PLC_AREA_LINK_SPECIAL_REGISTER 124 |
| #define | PLC_AREA_FILE_REGISTER 125 |
| #define | PLC_AREA_REFRESH_DATA_REGISTER 126 |
| #define | PLC_AREA_LONG_INDEX_REGISTER 127 |
| #define | PLC_AREA_SEQUENCE_CHAIN 128 |
| #define | PLC_AREA_LINK_RELAY 129 |
| #define | PLC_AREA_STATUS 200 |
| #define | PLC_AREA_CONTROL 201 |
| #define | PLC_AREA_STRING 202 |
| #define | PLC_AREA_ASCII 203 |
| #define | PLC_AREA_BCD 204 |
| #define | PLC_AREA_LONG 205 |
| #define | PLCSTSTAT_OK 0 |
| #define | PLCSTSTAT_BAD_TYPE 1 |
| #define | PLCSTSTAT_NO_DATA_AREA 2 |
| #define | PLCSTSTAT_OUT_OF_RANGE 3 |
| #define | PLCSTSTAT_TIMEOUT 4 |
| #define | PLCSTSTAT_BAD_ADDRESS 5 |
| #define | PLCSTSTAT_ILLEGAL_FUNCTION 6 |
| #define | PLCSTSTAT_NO_HARDWARE 7 |
| #define | PLCSTSTAT_PROTOCOL 8 |
| #define | PLCSTSTAT_OVERLOAD 9 |
| #define | PLCSTSTAT_WRITE_PROTECTED 10 |
| #define | PLCSTSTAT_READ_PROTECTED 11 |
| #define | PLCSTSTAT_BAD_STATE 12 |
| #define | PLCSTSTAT_AGAIN 16 |
| #define | PLCSTSTAT_WAIT_INITDATA 17 |
| #define | PLCSTSTAT_REMOTE_FAILURE 18 |
| #define | PLCSTSTAT_NOT_ENABLED 19 |
| #define | REQF_PASSIVE_WAIT 0x00000000 |
| #define | REQF_READ 0x00000001 |
| #define | REQF_WRITE 0x00000002 |
| #define | REQF_EXCHANGE 0x00000003 |
| #define | REQF_SYSREQUEST 0x00000004 |
| #define | REQF_READ_BLOCK 0x00000005 |
| #define | REQF_WRITE_BLOCK 0x00000006 |
| #define | REQF_READ_HISTORY 0x00000007 |
| #define | REQF_CALL 0x00000008 |
| #define | REQF_SUBSCRIBE REQF_READ |
| #define | REQF_UNSUBSCRIBE REQF_WRITE |
| #define | REQF_REFRESH_EVENT REQF_READ_BLOCK |
| #define | REQF_ACK_EVENT REQF_WRITE_BLOCK |
| #define | REQF_READ_ACK (REQF_READ | REQF_ACK_BIT) |
| #define | REQF_WRITE_ACK (REQF_WRITE | REQF_ACK_BIT) |
| #define | REQF_EXCHANGE_ACK (REQF_EXCHANGE | REQF_ACK_BIT) |
| #define | REQF_SYSREQUEST_ACK (REQF_SYSREQUEST | REQF_ACK_BIT) |
| #define | REQF_READ_BLOCK_ACK (REQF_READ_BLOCK | REQF_ACK_BIT) |
| #define | REQF_WRITE_BLOCK_ACK (REQF_WRITE_BLOCK | REQF_ACK_BIT) |
| #define | REQF_READ_HISTORY_ACK (REQF_READ_HISTORY | REQF_ACK_BIT) |
| #define | REQF_CALL_ACK (REQF_CALL | REQF_ACK_BIT) |
| #define | REQF_ACK_BIT 0x00000010 |
| #define | REQF_RW_MASK 0x0000001F |
| #define | REQF_GET_RW(u) ((u)&REQF_RW_MASK) |
| #define | REQF_SET_RW(u, cf) { (u) &= ~REQF_RW_MASK; (u) |= (cf) & REQF_RW_MASK; } |
| #define | REQF_SINGLE 0x00040000 |
| #define | REQF_POINTER_IS_OFFSET 0x00080000 |
PLC independant constants.
1.8.14