Go back to [NetworkViewer] section.
According to the Project ID field, the adequate configuration file containing all the variables and the corresponding memory offsets is automatically loaded by the NetworkViewer. The following section details the configuration file.
Supported data types in the NetworkViewer :
Let's suppose we have a project which answers the ALIVE_REQUEST with project_id = 1 with the following data structure :
typedef union { struct project_1_values { uint8 var1; //offset 0 uint16 var2; //offset 1 uint32 var3; //offset 3 sint8 var4; //offset 7 sint16 var5; //offset 8 sint32 var6; //offset 10 float var7; //offset 14 double var8; //offset 18 } unsigned char data_flow_table[26]; } AllData;
Here is the NetworkViewer configuration file for the variables :
<ModuleConfiguration moduleState="-1" deviceID="-1" projectID="1" codeVersion="-1" processorID="-1" tableVersion="-1" > <ModuleVariable offset="0" description="Description" type="uint8" value="" name="Var1" /> <ModuleVariable offset="1" description="Description" type="uint16" value="" name="Var2" /> <ModuleVariable offset="3" description="Description" type="uint32" value="" name="Var3" /> <ModuleVariable offset="7" description="Description" type="sint8" value="" name="Var4" /> <ModuleVariable offset="8" description="Description" type="sint16" value="" name="Var5" /> <ModuleVariable offset="10" description="Description" type="sint32" value="" name="Var6" /> <ModuleVariable offset="14" description="Description" type="float" value="" name="Var7" /> <ModuleVariable offset="18" description="Description" type="double" value="" name="Var8" /> </ModuleConfiguration>
Automatic scheduling of variables is done with the NetworkScheduler. It acts as a "round-robin" scheduler by scheduling "activated" variables one at the time at every millisecond (ms). Here is the automatique request sent over the CAN bus :
TABLE 3 : IntRoLab CAN Frame - Request a variable on the bus
PRIORITY (3 bits) TYPE (8 bits) BOOT (2 bits) COMMAND (8 bits) DESTINATION (8 bits) RTR (1 bit) DATA LENGTH (4 bits) DATA (0-64 bits)
CAN 29 bits ARBITRATION FIELD, EXTENDED ID (EID)
ADDITIONAL FRAME INFORMATION (STANDARD)
0 = max
CAN_TYPE_REQUEST_DATA=0x20
BIT0 = READ(0), BIT1 = RAM(O) ou EEPROM(1) depending on memory type.
CMD = memory offset (0,255), bytes
Module address
1 = Remote transmission request
Variable size in bytes, maximum = 8
Empty, RTR=1
The destination module will answer with :
TABLE 4 : IntRoLab CAN Frame - Answer For Variable Request
PRIORITY (3 bits) TYPE (8 bits) BOOT (2 bits) COMMAND (8 bits) DESTINATION (8 bits) RTR (1 bit) DATA LENGTH (4 bits) DATA (0-64 bits)
CAN 29 bits ARBITRATION FIELD, EXTENDED ID (EID)
ADDITIONAL FRAME INFORMATION (STANDARD)
0 = max
CAN_TYPE_REQUEST_DATA=0x20
BIT0 = READ(0), BIT1 = RAM(O) ou EEPROM(1) Depending on memory type.
CMD = memory offset (0,255)
Module address
0 = Normal
Variable size, maximum 8 bytes
DATA[0] = LSB, DATA[data_length -1] = MSB.