advertisement
BasicController CR0403
TIMER_READ_US
Unit type = function block (FB)
Unit is contained in the library ifm_CR0403_Vxxyyzz.LIB
Symbol in CODESYS:
35040
>
Description
27793
TIMER_READ_US reads the current system time in [µs].
When the supply voltage is applied, the device generates a clock pulse which is counted upwards in a register. This register can be read by means of the FB call and can for example be used for time measurement.
Info
>
The system timer runs up to the counter value 4 294 967 295 µs at the maximum and then starts again from 0.
4 294 967 295 µs = 1h 11min 34s 967ms 295µs
Parameters of the outputs
35086
Parameter
TIME_US
RESULT
Data type
DWORD
BYTE
Description current system time [ s] feedback of the function block
(possible messages → following table)
Possible results for RESULT:
Value dec | hex
Description
0
1
00
01
FB is inactive
FB execution completed without error
– data is valid
200
BasicController CR0403
>
6 Diagnosis and error handling
Content
28855
The runtime-system (RTS) checks the device by internal error checks:
• during the boot phase (reset phase)
• during executing the application program
→ chapter Operating states
In so doing a high operating reliability is provided, as much as possible.
6.1 Diagnosis
>
During the diagnosis, the "state of health" of the device is checked. It is to be found out if and what
→faults are given in the device.
Depending on the device, the inputs and outputs can also be monitored for their correct function.
- wire break,
- short circuit,
- value outside range.
For diagnosis, configuration and log data can be used, created during the "normal" operation of the device.
The correct start of the system components is monitored during the initialisation and start phase.
Errors are recorded in the log file.
For further diagnosis, self-tests can also be carried out.
28856
6.2 Fault
28834
>
A fault is the state of an item characterized by the inability to perform the requested function, excluding the inability during preventive maintenance or other planned actions, or due to lack of external resources.
A fault is often the result of a failure of the item itself, but may exist without prior failure.
In →ISO 13849-1 "fault" means "random fault".
6.3 Response to system errors
35831
In principle, the programmer is responsible to react to the error messages in the application program.
An error description is provided via the error message.
> The system resets the error message as soon as the error causing state is not present anymore.
201
>
BasicController CR0403
6.3.1 Example process for response to an error message
>
The runtime system cyclically writes the system flag TEMPERATURE.
The application program detects the device temperature by retrieving the INT variable.
If permissible values for the application are exceeded or not reached:
>
The application program deactivates the outputs.
► Rectify the cause of the error.
> The application program detects the temperature value which has returned to normal:
The machine / system can be restarted or operation can be continued.
6.4 CAN / CANopen: errors and error handling
→ System manual "Know-How ecomat mobile "
→ chapter CAN / CANopen: errors and error handling
35698
28808
202
BasicController CR0403
7 Appendix
Content
28796
Additionally to the indications in the data sheets you find summary tables in the appendix.
7.1 System flags
The addresses of the system flags can change if the PLC configuration is extended.
► While programming only use the symbol names of the system flags!
System flags (symbol name)
SUPPLY_VOLTAGE_VBBx
SUPPLY_VOLTAGE_VBBS
SUPPLY_VOLTAGE_VU
Type
WORD
WORD
WORD
INT
Description supply voltage on VBBx in [mV]
CR040n: x = 1, 2
CR041n: x = 1, 2
CR253n: x = 1, 2 supply voltage on VBBs in [mV] internal supply voltage in [mV]
Temperature in the device in [°C] TEMPERATURE
35784
203
advertisement
Related manuals
advertisement
Table of contents
- 10 Available memory
- 10 FLASH memory
- 10 SRAM
- 11 FRAM
- 12 Analogue inputs
- 13 Binary inputs
- 14 Input group IN0...IN3
- 14 Input group IN4...IN7
- 15 Resistance measurement
- 16 Input group IN8...IN11
- 17 Protective functions of the outputs
- 17 Definition: overload
- 17 Definition: short circuit
- 18 Reaction of the outputs to overload or short circuit
- 18 Self-protection of the output
- 18 Reaction according to the operating mode of the output
- 18 Reaction when using PWM or CURRENT_CONTROL
- 19 Output group OUT0, OUT1
- 19 Diagnosis: binary outputs (via current and voltage measurement)
- 20 Diagnosis: overload (via current measurement)
- 20 Diagnosis: wire break (via voltage measurement)
- 20 Diagnosis: short circuit (via voltage measurement)
- 21 Output group OUT2, OUT3, OUT8, OUT9
- 21 Diagnosis: binary outputs (via voltage measurement)
- 21 Diagnosis: overload
- 21 Diagnosis: wire break (via voltage measurement)
- 21 Diagnosis: short circuit (via voltage measurement)
- 22 Output group OUT4...OUT7
- 22 Output group OUT10, OUT11
- 23 Diagnosis: binary outputs (via voltage measurement)
- 23 Diagnosis: overload
- 23 Diagnosis: wire break (via voltage measurement)
- 23 Diagnosis: short circuit (via voltage measurement)
- 25 Control the LED in the application program
- 26 CAN: interfaces and protocols
- 27 Bootloader
- 28 Runtime system
- 28 Application program
- 28 Libraries
- 29 FB, FUN, PRG in CODESYS
- 30 Note the cycle time!
- 30 Important note to program the device
- 31 Creating application program
- 32 Using ifm maintenance tool
- 32 Distribution of the application program
- 32 INIT state (Reset)
- 33 STOP state
- 33 RUN state
- 34 ERROR state
- 34 FATAL ERROR state
- 35 Watchdog behaviour
- 36 Limitations for CAN in this device
- 36 Limitations for CANopen in this device
- 36 Limitations for CAN J1939 in this device
- 41 Set up the target
- 42 Activate the PLC configuration
- 43 CAN declaration (e.g. CR1080)
- 47 Safety instructions about Reed relays
- 47 Analogue inputs: configuration and diagnosis
- 48 Configure the software filters of the inputs
- 49 Binary inputs: configuration and diagnosis
- 49 Activation of the input diagnosis
- 49 Fast inputs
- 50 Use as binary inputs
- 51 Configure the software filters of the outputs
- 52 Binary outputs: configuration and diagnosis
- 52 Configuration of the output diagnosis
- 53 PWM outputs
- 53 Availability of PWM
- 53 FBs for PWM functions
- 53 Current control with PWM (= PWMi)
- 55 Save retain variables
- 55 Read back retain variables
- 63 Function elements: RAW-CAN status
- 64 CAN_ENABLE
- 64 Description
- 64 Parameters of the inputs
- 64 Parameters of the outputs
- 65 CAN_RECOVER
- 65 Description
- 65 Parameters of the inputs
- 66 CAN_SETDOWNLOADID
- 66 Description
- 66 Parameters of the inputs
- 66 Parameters of the outputs
- 67 CAN_STATUS
- 67 Description
- 67 Parameters of the inputs
- 67 Parameters of the outputs
- 69 Function elements: receive RAW-CAN data
- 70 CAN_RX
- 70 Description
- 70 Parameters of the inputs
- 70 Parameters of the outputs
- 71 CAN_RX_ENH
- 71 Description
- 71 Parameters of the inputs
- 72 Parameters of the outputs
- 73 CAN_RX_ENH_FIFO
- 73 Description
- 73 Parameters of the inputs
- 74 Parameters of the outputs
- 75 CAN_RX_RANGE
- 75 Description
- 75 Parameters of the inputs
- 76 Parameters of the outputs
- 77 CAN_RX_RANGE_FIFO
- 77 Description
- 77 Parameters of the inputs
- 78 Parameters of the outputs
- 79 Function elements: transmit RAW-CAN data
- 80 CAN_TX
- 80 Description
- 80 Parameters of the inputs
- 80 Parameters of the outputs
- 81 CAN_TX_ENH
- 81 Description
- 81 Parameters of the inputs
- 82 Parameters of the outputs
- 83 CAN_TX_ENH_CYCLIC
- 83 Description
- 83 Parameters of the inputs
- 84 Parameters of the outputs
- 85 Function elements: RAW-CAN remote
- 86 CAN_REMOTE_REQUEST
- 86 Description
- 86 Parameters of the inputs
- 86 Parameters of the outputs
- 87 CAN_REMOTE_RESPONSE
- 87 Description
- 87 Parameters of the inputs
- 88 Parameters of the outputs
- 89 Function elements: CANopen status
- 90 CANOPEN_ENABLE
- 90 Description
- 90 Parameters of the inputs
- 91 Parameters of the outputs
- 92 CANOPEN_GETBUFFERFLAGS
- 92 Description
- 92 Parameters of the inputs
- 93 Parameters of the outputs
- 94 CANOPEN_GETSTATE
- 94 Description
- 94 Parameters of the inputs
- 95 Parameters of the outputs
- 96 CANOPEN_SETSTATE
- 96 Description
- 97 Parameters of the inputs
- 97 Parameters of the outputs
- 98 Function elements: CANopen network management
- 99 CANOPEN_GETNMTSTATESLAVE
- 99 Description
- 99 Parameters of the inputs
- 99 Parameters of the outputs
- 100 CANOPEN_NMTSERVICES
- 100 Description
- 100 Parameters of the inputs
- 101 Parameters of the outputs
- 102 Function elements: CANopen object directory
- 103 CANOPEN_GETODCHANGEDFLAG
- 103 Description
- 103 Parameters of the inputs
- 103 Parameters of the outputs
- 104 CANOPEN_READOBJECTDICT
- 104 Description
- 104 Parameters of the inputs
- 104 Parameters of the outputs
- 105 CANOPEN_WRITEOBJECTDICT
- 105 Description
- 105 Parameters of the inputs
- 106 Parameters of the outputs
- 107 Function elements: CANopen SDOs
- 108 CANOPEN_SDOREAD
- 108 Description
- 108 Parameters of the inputs
- 109 Parameters of the outputs
- 110 CANOPEN_SDOREADBLOCK
- 110 Description
- 111 Parameters of the inputs
- 111 Parameters of the outputs
- 112 CANOPEN_SDOREADMULTI
- 112 Description
- 112 Parameters of the inputs
- 113 Parameters of the outputs
- 114 CANOPEN_SDOWRITE
- 114 Description
- 114 Parameters of the inputs
- 115 Parameters of the outputs
- 116 CANOPEN_SDOWRITEBLOCK
- 116 Description
- 117 Parameters of the inputs
- 117 Parameters of the outputs
- 118 CANOPEN_SDOWRITEMULTI
- 118 Description
- 118 Parameters of the inputs
- 119 Parameters of the outputs
- 120 Function elements: CANopen SYNC
- 121 CANOPEN_GETSYNCSTATE
- 121 Description
- 121 Parameters of the inputs
- 122 Parameters of the outputs
- 123 CANOPEN_SETSYNCSTATE
- 123 Description
- 123 Parameters of the inputs
- 123 Parameters of the outputs
- 124 Function elements: CANopen guarding
- 125 CANOPEN_GETGUARDHBERRLIST
- 125 Description
- 125 Parameters of the inputs
- 125 Parameters of the outputs
- 126 CANOPEN_GETGUARDHBSTATSLV
- 126 Description
- 126 Parameters of the inputs
- 127 Parameters of the outputs
- 128 Function elements: CANopen emergency
- 129 CANOPEN_GETEMCYMESSAGES
- 129 Description
- 129 Parameters of the inputs
- 130 Parameters of the outputs
- 131 CANOPEN_GETERRORREGISTER
- 131 Description
- 131 Parameters of the inputs
- 131 Parameters of the outputs
- 132 CANOPEN_SENDEMCYMESSAGE
- 132 Description
- 132 Parameters of the inputs
- 133 Parameters of the outputs
- 134 Function elements: SAE J1939 status
- 135 J1939_ENABLE
- 135 Description
- 135 Parameters of the inputs
- 136 Parameters of the outputs
- 137 J1939_GETDABYNAME
- 137 Description
- 138 Parameters of the inputs
- 138 Parameters of the outputs
- 139 J1939_NAME
- 139 Description
- 140 Parameters of the inputs
- 140 Parameters of the outputs
- 141 J1939_STATUS
- 141 Description
- 141 Parameters of the inputs
- 141 Parameters of the outputs
- 142 Function elements: SAE J1939 request
- 143 J1939_SPEC_REQ
- 143 Description
- 143 Parameters of the inputs
- 143 Parameters of the outputs
- 144 J1939_SPEC_REQ_MULTI
- 144 Description
- 144 Parameters of the inputs
- 144 Parameters of the outputs
- 145 Function elements: receive SAE J1939
- 146 J1939_RX
- 146 Description
- 146 Parameters of the inputs
- 146 Parameters of the outputs
- 147 J1939_RX_FIFO
- 147 Description
- 147 Parameters of the inputs
- 148 Parameters of the outputs
- 149 J1939_RX_MULTI
- 149 Description
- 149 Parameters of the inputs
- 149 Parameters of the outputs
- 150 Function elements: transmit SAE J1939
- 151 J1939_TX
- 151 Description
- 151 Parameters of the inputs
- 151 Parameters of the outputs
- 152 J1939_TX_ENH
- 152 Description
- 152 Parameters of the inputs
- 153 Parameters of the outputs
- 154 J1939_TX_ENH_CYCLIC
- 154 Description
- 154 Parameters of the inputs
- 155 Parameters of the outputs
- 156 J1939_TX_ENH_MULTI
- 156 Description
- 156 Parameters of the inputs
- 157 Parameters of the outputs
- 158 Function elements: SAE J1939 diagnosis
- 159 J1939_DM1RX
- 159 Description
- 159 Parameters of the inputs
- 160 Parameters of the outputs
- 161 J1939_DM1TX
- 161 Description
- 162 Parameters of the inputs
- 163 Parameters of the outputs
- 164 J1939_DM1TX_CFG
- 164 Description
- 164 Parameters of the inputs
- 164 Parameters of the outputs
- 165 J1939_DM3TX
- 165 Description
- 165 Parameters of the inputs
- 165 Parameters of the outputs
- 167 FASTCOUNT
- 167 Description
- 167 Parameters of the inputs
- 168 Parameters of the outputs
- 169 INC_ENCODER
- 169 Description
- 170 Parameters of the inputs
- 170 Parameters of the outputs
- 171 INPUT
- 171 Description
- 172 Parameters of the inputs
- 172 Parameters of the outputs
- 173 PERIOD
- 173 Description
- 174 Parameters of the inputs
- 175 Parameters of the outputs
- 177 CURRENT_CONTROL
- 177 Description
- 178 Parameters of the inputs
- 178 Parameters of the outputs
- 179 OUTPUT
- 179 Description
- 179 Parameters of the inputs
- 180 Parameters of the outputs
- 181 PWM1000
- 181 Description
- 181 Parameters of the inputs
- 182 Parameters of the outputs
- 184 FLASH_INFO
- 184 Description
- 184 Parameters of the inputs
- 184 Parameters of the outputs
- 185 FLASH_READ
- 185 Description
- 185 Parameters of the inputs
- 185 Parameters of the outputs
- 186 GET_APP_INFO
- 186 Description
- 186 Parameters of the inputs
- 186 Parameters of the outputs
- 187 GET_HW_INFO
- 187 Description
- 187 Parameters of the inputs
- 187 Parameters of the outputs
- 188 GET_IDENTITY
- 188 Description
- 188 Parameters of the inputs
- 188 Parameters of the outputs
- 189 GET_SW_INFO
- 189 Description
- 189 Parameters of the inputs
- 189 Parameters of the outputs
- 190 GET_SW_VERSION
- 190 Description
- 190 Parameters of the inputs
- 190 Parameters of the outputs
- 191 MEM_ERROR
- 191 Description
- 191 Parameters of the inputs
- 191 Parameters of the outputs
- 192 MEMCPY
- 192 Description
- 192 Parameters of the inputs
- 193 Parameters of the outputs
- 194 OHC
- 194 Description
- 194 Parameters of the inputs
- 195 Parameters of the outputs
- 196 SET_IDENTITY
- 196 Description
- 196 Parameters of the inputs
- 196 Parameters of the outputs
- 197 SET_LED
- 197 Description
- 197 Parameters of the inputs
- 198 Parameters of the outputs
- 199 SET_PASSWORD
- 199 Description
- 199 Parameters of the inputs
- 199 Parameters of the outputs
- 200 TIMER_READ_US
- 200 Description
- 200 Parameters of the outputs
- 204 Inputs: address assignment
- 205 Outputs: address assignment
- 207 Inputs: operating modes
- 208 Outputs: operating modes
- 209 EMCY codes: CANx
- 210 EMCY codes: I/Os, system
- 210 Manufacturer-specific information (detail)