550 601 04 |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Service channel (ch. 0). All DPIsAll PD 600 DPI series devices have a service channel containing variables and functions common to the entire device.
RegNo. 0: NumberOfSWNo
This variable holds the highest SWNo in the device.
RegNo. 1: DeviceIDThis variable is a record having the following structure:
This record identifies the device. The record includes a registered manufacturer number, the type number of the device, and a string identifying the manufacturer. An example of the field values in the DeviceID record is shown below:
RegNo. 3: Reset
By writing 255 ($FF) to Reset, the device performs a Reset, and ExternalReset in CommonError.ChError.His is set True.
RegNo. 4: PNETSerialNoThis variable is a record having the following structure:
The serial number is used for service purposes and acts as a 'key' for setting the P-NET Node Address and number of masters for the port used to access this variable. For example, if this variable is accessed from port 1, the P-NET Node Address and number of masters for port 1 are accessed. A special function is included for identifying a device connected to a network containing many other devices, having the same or unknown node addresses, and to enable a change of the node address and number of masters via the P-NET. Setting a new node address and number of masters via P-NET, is performed by writing the required node address, together with the serial number of the device in question, into the PNETSerialNo at node address $7E (calling all devices). All devices on the P-NET will receive the message, but only the device with the transmitted serial number will store the P-NET node address and the number of masters. An attempt to write data to node address $7E will give no reply. Consequently the calling master must disable the generation of a transmission error when addressing this node. In the device, the SerialNo = "XXXXXXXXPD", is set by PROCES-DATA, and cannot be changed. The eight “X”es indicate the serial number, and PD is the initials of PROCES-DATA.
Accessing this variable from port 1 gives access to PNETNo and NoOfMasters for port 1. Accessing this variable from port 2 gives access to PNETNo and NoOfMasters for port 2. Accessing this variable from Process-Pascal gives access to PNETNo and NoOfMasters for port 1.
RegNo. 5: RealDateTimeThis variable is a record having the following structure:
This variable holds the date and time in the OleDateTime format as used by PC applications. The variable holds 2 fields of type LongReal, indicating the number of days since 30 December 1899, midnight. Days are represented by whole number increments starting with 30 December 1899, midnight as time zero. Hour values are expressed as the absolute value of the fractional part of the number. This is illustrated in the following table.
So, the RealDateTime fields represent date and time as a classic number line.
Local The Local field represents the local date and time, adjusted for daylight saving and time zone, which are found in 2 fields of the RealDateTime record.
UTC The UTC field represents UTC date and time.
TimezoneBias TimezoneBias holds the difference in minutes between UTC time and local time. To calculate local time, the DPI subtracts the values TimezoneBias and DaylightBias from UTC. If the time zone is for example GMT+1, the value of TimezoneBias shall be set to –60.
DaylightBias DaylightBias holds the difference in minutes between UTC time and local time. During daylight saving periods the value of DaylightBias shall be set to –60. During normal time periods the value shall be set to 0.
Unlike other records, the fields of the RealDateTime record are located in different kinds of memory. The Local and UTC fields are placed in RAM, and the TimezoneBias and DaylightBias fields are placed in EEPROM. For this reason, and because setting of one field may influence the other fields, it is only possible to access one field of the RealDateTime record at a time.
RegNo. 6: TimeDateThis variable is a record having the following structure:
This variable represents the Local time and date in individual fields for Second, Minute and so on. The "Day" field cannot be modified by the user, but will automatically show day of week.
RegNo. 7: FreeRunTimer
This variable is a counter to which internal events are synchronised.
The timer runs when the device is running, remains unchanged during power failure, and continues after a reset.
The timer is incremented at a frequency of 256 Hz (1/256 secs.). It counts from zero after a MasterReset, to FFFFFFFF (hex) and then continues from zero again. This gives a time span of approx. 194 days.
The counter is synchronized with the built-in real time clock system.
RegNo. 9: DeviceConfigThis variable is a record having the following structure:
Enablebit Enablebit[0] indicates whether variables in FLASH memory are protected by WriteEnable or not. Enablebit[0] = True indicates that WriteEnable must be set True to change variables in FLASH. Enablebit[0] = False (default) indicates that variables in FLASH can be changed without setting WriteEnable True.
EnableBit[1] is used to disable battery check. EnableBit[1] = False (default) indicates, that battery check is enabled. EnableBit[1] = True means “battery check disabled”. Refer to BatteryState for further details.
EnableBit[2] = True enables the RAM preserve facility, introduced in version 2.10. By default, the facility is disabled. When enabled, the DPI will require a power supply voltage at approx. 18 V or higher to start. During power down, when the voltage reaches 18 V, the checksum value of all RAM in use is calculated, after which the DPI generates a reset and waits for the supply voltage to exceed 18 V again. During power up, the RealTimeClock circuitry is checked to ascertain whether the battery voltage has been too low during power failure. If so, the RAM contents will normally be cleared (MasterReset). However, when the RAM preserve facility is enabled, the checksum value is calculated, and compared to the one calculated during power down. If equal, the RAM contents is preserved, time is set to the value prior to the power failure, and the ResetCode “7” is generated. This functionality is relevant because the RAM can preserve its contents at a lower voltage than required for the RealTimeClock circuitry to operate. The downside of this is that the power supply voltage must be approx. 18 V or higher. Also note that if the power failure is a result of removing the DPI from the base module, or removing the wires between power supply and cluster, there may not be enough time to calculate the checksum value. The new RAM preserve system requires version 2.10 or higher of both BOOT and FLASH OS. If EnableBit[2] is set True in FLASH OS 2.10 or higher, and BOOT OS version is lower, the error “BOOT OS too old” will be generated.
EnableBit[3..7], Functions, Notification and User are not used.
RegNo. 12: NetParamThis variable is a record having the following structure:
This variable holds the net parameters Baudrate, ErrorCheck and NoOfMasters for the port used to access the variable. For example, if the variable is accessed from port 1, the net parameters for port 1 are accessed. The variable can’t be accessed from Process-Pascal.
The variable is stored in memory type EEPROM RPW, meaning it can only be changed if WriteEnable is True.
Baudrate Baudrate holds the bit rate for the port from which the variable is accessed. Which values are legal depends on the type of the port.
ErrorCheck ErrorCheck holds the errorcheck method used for the port from which the variable is accessed. False means “Default (1 byte) errorcheck”, and True means “Extended (2 byte) errorcheck”.
NoOfMasters NoOfMasters holds the number of masters for the port from which the variable is accessed.
RegNo. 13: WriteEnable
Write protected variables can only be changed when the value of WriteEnable is True. After Reset, the value of WriteEnable is False.
NB: Typically, write protected variables are stored in EEPROM or FLASH. Writing to EEPROM is limited to 106 cycles for each variable. Writing to FLASH is limited to 105 cycles for each variable.
The DPI is equipped with a hall sensor, which is able to detect, whether a magnet is placed near the device. If the hall sensor detects a magnet, WriteEnable cannot be set True. This can be used to seal the device, thus preventing any download, debugging or configuration change.
Each time the value of WriteEnable is set True, the value of SealCount is incremented by 1. This makes it possible to detect, whether WriteEnable has been set True, and thus whether the configuration of the DPI has possibly been changed.
RegNo. 14: ChTypeThis variable is a record having the following structure:
Each channel in the device is described by an individual ChType variable. The ChType variable is a record, holding a unique number for the channel type, and a True Boolean value for each of the registers that are represented within the channel. The register number in a channel corresponds to the index number in the Boolean array. In addition to these fields various other fields can be found in the record, depending on the channel type. For the service channel, the record has the structure shown above, having the following field values:
ChannelType = 1
Exist =
Functions =
RegNo. 15: CommonErrorThis variable is a record having the following structure:
The following functional description of ChError.His and ChError.Act applies in all channels:
1) When an error is detected, the corresponding bits in ChError.His and ChError.Act are set True. 2) When the error disappears, the corresponding bit in ChError.Act is cleared. 3) After reading ChError.His, ChError.Act is copied to ChError.His. 4) Transmission responses from the device include an Actual Data Error bit. This bit will be True if any bit in ChError.Act is True. 5) Transmission responses from the device include a Historical Data Error bit. This bit will be True if any bit in ChError.His is True.
ComHis and ComAct ComHis and ComAct are unique fields in the Service channel, and hold an error status relating to all channels, where the bit number corresponds to the channel number. Each channel has an error register: ChError. If any bit (0 - 6) in ChError.His in a particular channel is True, the bit corresponding to that channel in ComHis is True. If any bit (0 - 6) in ChError.Act in a particular channel is True, the bit corresponding to that channel in ComAct is True. When a channel becomes error free, the corresponding bit in ComAct is automatically cleared. If a channel is error free, the corresponding bit in ComHis will be cleared when reading ChError.His for that channel.
ChError.His and ChError.Act The 8 bits in ChError.His and ChError.Act have the following meaning:
Code A ResetCode stored in the byte immediately following ChError.His indicates the reason for the Reset, as shown in the table:
ResetCode is not cleared as a result of reading it.
When an error in Data-FLASH occurs, the value of ResetCode is overwritten by a code indicating the type of Data-FLASH error, according to the following table:
Refer to UserFLASH for further information.
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||