#--------------------------------------------------------------------------------------------
# IP address
#--------------------------------------------------------------------------------------------
# Note: Modbus slave address IP may be configured to use a particular IP (provided it exists) by uncommenting the line below. Otherwise the Software uses the first non-localhost IP available; or localhost if nothing is available. 
#modbus_slave_address = 0.0.0.0
modbus_slave_port = 9001
modbus_slave_ID = 1

#--------------------------------------------------------------------------------------------
# Register Syntax: 
#--------------------------------------------------------------------------------------------
# Register_name = Register_number, multiplier_value
# If no multiplier is present, a hard-coded internal value or default 1x multiplier is used.


#--------------------------------------------------------------------------------------------
# HOLDING REGISTERS
#--------------------------------------------------------------------------------------------
# Exceptions:
# - HR_commands sets single bits; Multiplier does not apply.
# - HR_PWM_duty_cycle must be an int value between 1 and 99; Multiplier does not apply.
# - PID is not implemented. All PID-related registers are effectively placeholders.
#--------------------------------------------------------------------------------------------
HR_commands = 24576
HR_FWD_power_setpoint = 24577, 1
HR_frequency_setpoint = 24578, 0.1
HR_sweep_start_freq = 24579, 0.1
HR_sweep_stop_freq = 24580, 0.1
HR_sweep_step_freq = 24581, 0.1
HR_sweep_power = 24582, 1
HR_DLL_frequency_lower = 24583, 0.1
HR_DLL_frequency_upper = 24584, 0.1
HR_DLL_frequency_start = 24585, 0.1
HR_DLL_frequency_step = 24586, 0.1
HR_DLL_threshold = 24587, 0.001
HR_DLL_delay = 24588, 1
#HR_PWM_frequency = 24589, 1
HR_PWM_duty_cycle = 24590, 1
HR_PID_Kp = 24591, 0.01
HR_PID_Ki = 24592, 0.01
HR_PID_Kd = 24593, 0.01
HR_PID_setpoint = 24594, 1
HR_PID_scaling_factor = 24595, 0.01
HR_PID_offset = 24596, 1
HR_phase = 24597, 1
HR_clock_source = 24598
HR_PGB_ch1_phase = 24599
HR_PGB_ch2_phase = 24600
HR_PGB_ch3_phase = 24601
HR_PGB_ch4_phase = 24602

#--------------------------------------------------------------------------------------------
# INPUT REGISTERS
#--------------------------------------------------------------------------------------------
# Modbus registers accept only whole numbers between 0 and 65535
# As a result any multipliers in this section must be positive, whole numbers. 
#
# Exceptions:
# - IR_status 			sets single bits; Multiplier does not apply.
# - IR_SG_error_high 	sets single bits; Multiplier does not apply.
# - IR_SG_error_low 	sets single bits; Multiplier does not apply.
# - IR_PWM_duty_cycle 	must be an int value between 1 and 99; Multiplier does not apply.
# - IR_clock_source 	must be an int value between 0 and 3; Multiplier does not apply.
#--------------------------------------------------------------------------------------------
IR_status = 8192
IR_FWD_power_setpoint = 8193, 1
IR_FWD_power = 8194, 1
IR_RFL_power = 8195, 1
IR_return_loss = 8196, 1000
IR_actual_frequency = 8197, 10
IR_S11_frequency_best_match = 8198, 10
IR_S11_loss_best_match = 8199, 1000
IR_S11_loss_start_freq = 8200, 1000
IR_S11_loss_stop_freq = 8201, 1000
IR_temperature = 8202, 10
IR_SG_error_P4 = 8203
IR_SG_error_P3 = 8204
IR_SG_error_P2 = 8205
IR_SG_error_P1 = 8206
IR_SWP_start_frequency = 8207, 10
IR_SWP_stop_frequency = 8208, 10
IR_SWP_step_frequency = 8209, 10
IR_SWP_power = 8210, 1
IR_PWM_frequency = 8211, 1
IR_PWM_duty_cycle = 8212
IR_PSU1_voltage = 8213, 10
IR_PSU1_current = 8214, 10
IR_PSU1_power = 8215, 1
IR_PSU2_voltage = 8216, 10
IR_PSU2_current = 8217, 10
IR_PSU2_power = 8218, 1
IR_PSU3_voltage = 8219, 10
IR_PSU3_current = 8220, 10
IR_PSU3_power = 8221, 1
IR_PSU4_voltage = 8222, 10
IR_PSU4_current = 8223, 10
IR_PSU4_power = 8224, 1
IR_PSU_power_efficiency = 8225, 10
IR_PSU_power_dissipation = 8226
IR_phase = 8227, 1
IR_clock_source = 8228
IR_PGB_ch1_phase = 8229
IR_PGB_ch2_phase = 8230
IR_PGB_ch3_phase = 8231
IR_PGB_ch4_phase = 8232