import pickle

channels = {
    'vfd_nameplatehz':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'cfg_NameplateHz',
        'last_time_uploaded':0,
        'last_value':''
    },
    'mode_test':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'Test_Mode',
        'last_time_uploaded':0,
        'last_value':''
    },
    'alarm_temperature':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'ALARM_Temperature',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_pressure_shutdown_limit':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'DH_Pressure_Shutdown',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_temp_startup_limit':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'DH_Temp_Startup',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_fault_code':{
        'data_type':'UINT',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'VFD_Fault_DriveFault_Code',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_dischargetemperature':{
        'data_type':'UINT',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'DH_DischargeTemperature',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_maxintakepressure_forever':{
        'data_type':'UINT',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'DH_MaxIntakePressure_Forever',
        'last_time_uploaded':0,
        'last_value':''
    },
    'alarm_pressure':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'ALARM_Pressure',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_temp_startup_enabled':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'DH_Temp_Startup_Enabled',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_torqueperfmode':{
        'data_type':'UINT',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'cfg_TorquePerfMode',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_windingtemperature':{
        'data_type':'UINT',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'DH_WindingTemperature',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_motorpoles':{
        'data_type':'UINT',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'cfg_MotorPoles',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_nameplatehp':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'cfg_NameplateHP',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_active':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'VFD_Active',
        'last_time_uploaded':0,
        'last_value':''
    },
    'rp_tubingpressure':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'RP_TubingPressure',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_speedfdbk':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'VFD_SpeedFdbk',
        'last_time_uploaded':0,
        'last_value':''
    },
    'rp_mode':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'RP_Mode',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_maxintaketemperature_forever':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'DH_MaxIntakeTemperature_Forever',
        'last_time_uploaded':0,
        'last_value':''
    },
    'sp_mode':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'SP_Mode',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_acceltime':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'VFD_AccelTime',
        'last_time_uploaded':0,
        'last_value':''
    },
    'tubingpressure_alarm_delay':{
        'data_type':'UDINT',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'TubingPressure_Alarm_Delay',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_tooltype':{
        'data_type':'UINT',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'DH_ToolType',
        'last_time_uploaded':0,
        'last_value':''
    },
    'sp_pressure':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'SP_Pressure',
        'last_time_uploaded':0,
        'last_value':''
    },
    'rp_trip':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'RP_Trip',
        'last_time_uploaded':0,
        'last_value':''
    },
    'alarm_mode':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'ALARM_Mode',
        'last_time_uploaded':0,
        'last_value':''
    },
    'stop_command':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'Stop_Command',
        'last_time_uploaded':0,
        'last_value':''
    },
    'tubingpressure_eu_min':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'TubingPressure_EU_Min',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_stopmode':{
        'data_type':'UINT',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'cfg_StopMode',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_ready':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'VFD_Ready',
        'last_time_uploaded':0,
        'last_value':''
    },
    'off_mode':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'Off_Mode',
        'last_time_uploaded':0,
        'last_value':''
    },
    'alarm_tubingpressure':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'ALARM_TubingPressure',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_disabled':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'VFD_Disabled',
        'last_time_uploaded':0,
        'last_value':''
    },
    'tubingpressure_eu_max':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'TubingPressure_EU_Max',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_speedref':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'VFD_SpeedRef',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_maxintaketemperature_startup':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'DH_MaxIntakeTemperature_Startup',
        'last_time_uploaded':0,
        'last_value':''
    },
    'sp_temperature':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'SP_Temperature',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_pressure_startup':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'DH_Pressure_Startup',
        'last_time_uploaded':0,
        'last_value':''
    },
    'hand_mode':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'Hand_Mode',
        'last_time_uploaded':0,
        'last_value':''
    },
    'tubingpressure_lo':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'TubingPressure_Lo',
        'last_time_uploaded':0,
        'last_value':''
    },
    'run_permissive':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'Run_Permissive',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_maxfreq':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'cfg_MaxFreq',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_temp_shutdown_enabled':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'DH_Temp_Shutdown_Enabled',
        'last_time_uploaded':0,
        'last_value':''
    },
    'sp_voltage':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'SP_Voltage',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_pressure_shutdown_enabled':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'DH_Pressure_Shutdown_Enabled',
        'last_time_uploaded':0,
        'last_value':''
    },
    'sp_trip':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'SP_Trip',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_intakepressure':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'DH_IntakePressure',
        'last_time_uploaded':0,
        'last_value':''
    },
    'rp_pressure':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'RP_Pressure',
        'last_time_uploaded':0,
        'last_value':''
    },
    'rp_remote':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'RP_Remote',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_nameplatefla':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'cfg_NameplateFLA',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_fault_commerror':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'VFD_Fault_CommError',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_fault':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'VFD_Fault',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_psirating':{
        'data_type':'UINT',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'DH_PSIRating',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_atspeedref':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'VFD_AtSpeedRef',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_numchannels':{
        'data_type':'UINT',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'DH_NumChannels',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_dcbusvoltage':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'VFD_DCBusVoltage',
        'last_time_uploaded':0,
        'last_value':''
    },
    'tubingpressure_transducer_enabled':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'TubingPressure_Transducer_Enabled',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_downholestatus_int':{
        'data_type':'UINT',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'DH_DownholeStatus_INT',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_toolvoltage':{
        'data_type':'UINT',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'DH_ToolVoltage',
        'last_time_uploaded':0,
        'last_value':''
    },
    'tubingpressure_alarm_startup_delay':{
        'data_type':'DINT',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'TubingPressure_Alarm_Startup_Delay',
        'last_time_uploaded':0,
        'last_value':''
    },
    'alarm_vfd':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'ALARM_VFD',
        'last_time_uploaded':0,
        'last_value':''
    },
    'auto_mode':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'Auto_Mode',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_fluid_level':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'DH_Fluid_Level',
        'last_time_uploaded':0,
        'last_value':''
    },
    'alarm_remote':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'ALARM_Remote',
        'last_time_uploaded':0,
        'last_value':''
    },
    'sp_remote':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'SP_Remote',
        'last_time_uploaded':0,
        'last_value':''
    },
    'sp_vfd':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'SP_VFD',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_nameplaterpm':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'cfg_NameplateRPM',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_nameplateolcurrent':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'cfg_NameplateOLCurrent',
        'last_time_uploaded':0,
        'last_value':''
    },
    'start_permissive':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'Start_Permissive',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_dischargepressure':{
        'data_type':'UINT',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'DH_DischargePressure',
        'last_time_uploaded':0,
        'last_value':''
    },
    'tubingpressure_ok':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'TubingPressure_OK',
        'last_time_uploaded':0,
        'last_value':''
    },
    'rp_temperature':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'RP_Temperature',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_cmdfwd':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'VFD_CmdFwd',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_outputcurrent':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'VFD_OutputCurrent',
        'last_time_uploaded':0,
        'last_value':''
    },
    'rp_vfd':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'RP_VFD',
        'last_time_uploaded':0,
        'last_value':''
    },
    'tubingpressure_hi_sp':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'TubingPressure_Hi_SP',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_outputvoltage':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'VFD_OutputVoltage',
        'last_time_uploaded':0,
        'last_value':''
    },
    'downhole_tool_enabled':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'Downhole_Tool_Enabled',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_fault_drivefault':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'VFD_Fault_DriveFault',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_nameplatevolts':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'cfg_NameplateVolts',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_intaketemperature':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'DH_IntakeTemperature',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_MinFreq':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'cfg_MinFreq',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_temp_shutdown':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'DH_Temp_Shutdown',
        'last_time_uploaded':0,
        'last_value':''
    },
    'tubingpressure_hi':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'TubingPressure_Hi',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_deceltime':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'VFD_DecelTime',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_pressure_startup_enabled':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'DH_Pressure_Startup_Enabled',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dh_maxintakepressure_startup':{
        'data_type':'UINT',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'DH_MaxIntakePressure_Startup',
        'last_time_uploaded':0,
        'last_value':''
    },
    'tubingpressure_lo_sp':{
        'data_type':'REAL',
        'change_amount':0.5,
        'min_time_between_uploads':360,
        'tag':'TubingPressure_Lo_SP',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfd_clearfault':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'VFD_ClearFault',
        'last_time_uploaded':0,
        'last_value':''
    },
    'remote_shutdown_disabled':{
        'data_type':'BOOL',
        'change_amount':None,
        'min_time_between_uploads':360,
        'tag':'Remote_Shutdown_Disabled',
        'last_time_uploaded':0,
        'last_value':''
    }
}

with open('vfd_ipp_channels.p', 'wb') as ch_f:
    pickle.dump(channels, ch_f)
