550 558 04
This document provides full details about the structure and contents of the Service Channel incorporated into M36 Digital Slave device types.
Registers in Service channel:
This constant holds the highest SWNo in the device. It occupies the same memory location as the NumberOfSWNo field in the DeviceID record below, but is declared as an Integer.
RegNo. 0: DeviceInfo
This record holds the complete identification of the module, including the version number of the hardware and the software. DeviceInfo is used during the procedure when it is required to download updated firmware. The firmware download feature can be selected by right-clicking the module in the VIGO MIB.
The firmware download is available only for modules specifically listed in this document.
The purpose of this record is to be able to identify a connected device. The record includes registered manufacturer number, the type number of the device and a string, identifying the manufacturer.
The record has the following structure:
This constant is stored in Read only memory and cannot be changed.
A notification is used to inform users of variable values when new values are available. Several conditions can set the notification bit and the conditions can be chosen in ChConfig.Notification on each channel. The Notification register is cleared automatically after a read. After a power-up all notification bits are set.
By writing 255 Dec. to SWNo 3, the device performs a reset, and ExternalReset in CommonError is set TRUE.
This Variable is a record having the following structure:
The serial number is used for service purposes and as a 'key' to setting the device's P-NET Node address.
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 via the P-NET.
Setting a new node address via the 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 126 Dec. (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.
FreeRunTimer is a timer, to which internal events are synchronized. The timer has a 1/256 second resolution.
M36 Slave devices with digital outputs are equipped with a P-NET Watchdog, which switches off all the digital outputs, by clearing OutFlags and Control flags, if P-NET communication ceases.
WDTimer is automatically preset with the value from WDPreset, either each time the device is called via P-NET, or following a power-up or device reset. If the WDTimer reaches zero before it is preset again, the PnetWDRunOut flag will be set, and all the outputs will switch OFF. The WDTimer contains a value in seconds.
The variable is a record having the following structure:
The watchdog facility may be switched on and off by means of the field variable Functions as shown below.
By default, DeviceConfig.Functions = 16 (decimal), meaning watchdog off.
The notification function can be enabled as shown below.
If Service.DeviceConfig.Notification is True, service channel notification is enabled. This means that Service.Notification will be set True when the value of CommonError.ChError.Act changes. Default value: 0.
This field is available for the user. Default value: 0.
The maximum permitted time between calls to the device before the watchdog will be activated, is defined in seconds in this register. Default value: 0.
When several masters are communicating with a module, each request causes the module’s WDTimer to be preset, thus preventing a Watchdog alarm. To ensure that a specific master continues to regularly communicate with the module, WDPreset could initially be set by that master to 0 or less (e.g. -1). This change will then lead to a rather different functionality, where the particular master will need to be programmed to provide an initial and regular update of the WDTimer with a positive value. In the event that this update is missed, for example because of an error in this master, and being the one responsible for controlling the outputs, the WDTimer will reach zero before it is preset again, whereupon the PnetWDRunOut flag will be set, and all the outputs will switch OFF to their safe states.
The Super Global Variable concept is for future utilization, where tools for automatic setup and use of the SGVTable will be available.
So far, the following is defined:
When a P-NET request is received with a negative SWNo, it means that this is a request to a Super Global Variable. The device performs a binary search through the SGVSWNos in the SGVTable to find a match. If a match is found, SGVTable.SWNo is used instead.
If a Load instruction is given and Owner bit is set, a special response is sent on the P-NET (a P-NET Store request)
The SGVSWNos must be sorted in decreasing order (for example -2 on index 1, -14 on index 2). It is not allowed to have identical SGVSWNos in the table. The value of SGVSWNo must be 0 in not used entries.
This field selects the baud rate for the LightLink P-NET communication. Baudrate can hold the values 76800 or 230400.
This field selects the error check method used for P-NET Light-Link communication.
RegNo. 13: WriteEnable
Write protected variables can only be changed when WriteEnable is TRUE. After a reset, WriteEnable is set to FALSE.
Each channel in an interface device is described in an individual ChType variable. This is a Record, consisting of a unique number for the channel type and a TRUE Boolean value for each of the registers that are represented within a channel. The register number in a channel corresponds to the index number in the Boolean array.
The record for the service channel has the following structure:
For the service channel, ChType has the following value:
ChannelType = 1 (Service channel)
The CommonError variable holds error information for all Channels within the device.
This variable is a record having the following structure:
The 8 bits in ChError.His and ChError.Act have the following meaning:
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 ChError.His in a particular channel is <> 0, the corresponding bit is set in ComHis. If ChError.Act in a particular channel is <> 0, the corresponding bit is set in ComAct in the service channel. If the error disappears (ChError.Act = 0), the corresponding bit in ComAct is automatically cleared.
If the channels become error free, individual bits in ComHis will be cleared when reading ChError in each of the channels.