« Close

Datasheets and User Guides

App Notes

Software & Driver

 

4.3.2 - Configuration

There are two IOTypes used to write or read UE9 configuration parameters:

LJ_ioPUT_CONFIG
LJ_ioGET_CONFIG

The following constants are then used in the channel parameter of the config function call to specify what is being written or read:

LJ_chLOCALID
LJ_chHARDWARE_VERSION
LJ_chSERIAL_NUMBER
LJ_chCOMM_POWER_LEVEL
LJ_chIP_ADDRESS
LJ_chGATEWAY
LJ_chSUBNET
LJ_chPORTA
LJ_chPORTB
LJ_chDHCP
LJ_chPRODUCTID
LJ_chMACADDRESS
LJ_chCOMM_FIRMWARE_VERSION 
LJ_chCONTROL_POWER_LEVEL
LJ_chCONTROL_FIRMWARE_VERSION
LJ_chCONTROL_BOOTLOADER_VERSION
LJ_chCONTROL_RESET_SOURCE
LJ_chUE9_PRO

More information about these parameters can be found in documentation for the low-level CommConfig and ControlConfig functions.

Following is example pseudocode to write and read the IP address:

//Convert an address string in dot notation to a double.
//The general form of the StringToDoubleAddress function is:
//StringToDoubleAddress (String, *Number, HexDot)
StringToDoubleAddress (“192.168.1.210”, &dblAddress, 0);

//Write a new IP address.  Like all Ethernet parameters, this
//will not take effect until the UE9 is reset.
ePut (lngHandle, LJ_ioPUT_CONFIG, LJ_chIP_ADDRESS, dblAddress, 0);

//Read the current IP address.
eGet (lngHandle, LJ_ioGET_CONFIG, LJ_chIP_ADDRESS, &dblAddress, 0);

//Convert a double to an address string in dot notation.
//The general form of the DoubleToStringAddress function is:
//DoubleToStringAddress (Number, *String, HexDot)
DoubleToStringAddress (dblAddress, strIPAddress, 0);
The following can be used to reset the configuration of the timers & counters:
LJ_ioPIN_CONFIGURATION_RESET

Currently there is no IOType for configuring all the power-up default settings. However, using low-level functionality you can.

To configure the UE9 power-up default settings, first configure your I/O to the power-up default settings you want. This includes Analog Outputs, Digital I/O and Timers & Counters settings.

Then use the Raw Output/Input functionality to send/receive (LJ_ioRAW_OUT/LJ_ioRAW_IN) the low-level SetDefaults command/response. SetDefaults causes the current or last used UE9 configuration to be stored in flash as the power-up defaults.