CommConfig (UE9 Only)
Writes and reads various configuration settings associated with the Comm processor.
If WriteMask is nonzero, some or all default values are written to flash. The Comm flash has a rated endurance of at least 20000 writes, which is plenty for reasonable operation, but if this function is called in a high-speed loop with a nonzero WriteMask, the flash could eventually be damaged.
There is a hardware method to restore parameters to the default values described below (in parentheses). Power up the UE9 with a short from FIO2<=>SCL, then remove the jumper and power cycle the device again. This also returns Control settings to factory defaults (ControlConfig and Watchdog).
Command: |
|
|
Byte |
|
|
0 | Checksum8 |
|
1 | 0×78 |
|
2 | 0×10 |
|
3 | 0×01 |
|
4 | Checksum16 (LSB) |
|
5 | Checksum16 (MSB) |
|
6 | WriteMask |
|
7 | Reserved |
|
8 | LocalID [0] |
|
9 | PowerLevel [1] |
|
|
| 0×00: Normal |
|
| 0×01: Reserved |
|
| 0×02: Reserved |
10-13 | IPAddress [2] |
|
14-17 | Gateway [3] |
|
18-21 | Subnet [4] |
|
22-23 | PortA [5] |
|
24-25 | PortB [5] |
|
26 | DHCPEnabled [6] |
|
27 | 0×00 |
|
28-33 | 0×00 |
|
34-35 | 0×00 |
|
36-37 | 0×00 |
|
|
|
|
[#] denotes WriteMask bit number association. | ||
|
|
|
Response: |
|
|
Byte |
|
|
0 | Checksum8 |
|
1 | 0×78 |
|
2 | 0×10 |
|
3 | 0×01 |
|
4 | Checksum16 (LSB) |
|
5 | Checksum16 (MSB) |
|
6 | WriteMask |
|
7 | Reserved |
|
8 | LocalID |
|
9 | PowerLevel |
|
10-13 | IPAddress |
|
14-17 | Gateway |
|
18-21 | Subnet |
|
22-23 | PortA |
|
24-25 | PortB |
|
26 | DHCPEnabled |
|
27 | ProductID |
|
28-33 | MACAddress |
|
34-35 | HWVersion |
|
36-37 | CommFWVersion |
|
WriteMask: See the general protocol description.
LocalID: (1) Used by higher-level functions to identify a specific LabJack.
PowerLevel: (0) Not implemented.
IPAddress: (192.168.1.209) The value returned by this parameter is the current IPAddress. If you write a new IPAddress, it will not take effect until after a reset, so you will not immediately read back the new address.
Gateway: (192.168.1.1) Reset required for a change to take effect.
Subnet: (255.255.255.0) Reset required for a change to take effect.
PortA: (52360) Normal TCP/UDP port. Reset required for a change to take effect. Note that bit 5 of WriteMask affects PortA and PortB.
PortB: (52361) Secondary TCP port. Reset required for a change to take effect. Only used to send stream data from the UE9 to the host.
DHCPEnabled: (0) A value of 1 means that DHCP is enabled. Reset required for a change to take effect.
ProductID: (9) Fixed parameter identifies this LabJack as a UE9.
MACAddress: Fixed parameter. To determine the 4-byte serial number, add hex 10.0.0.0 to the lower 3 bytes of the MAC.
HWVersion: Fixed parameter specifies the version number of the electronics hardware. The lower byte is the integer portion of the version and the higher byte is the fractional portion of the version.
CommFWVersion: Fixed parameter specifies the version number of the Comm firmware. A firmware upgrade will generally cause this parameter to change. The lower byte is the integer portion of the version and the higher byte is the fractional portion of the version.