import pickle

channels = {
    'vfdnameplatehz':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'cfg_NameplateHz',
        'last_time_uploaded':0,
        'last_value':''
    },
    'modetest':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'Test_Mode',
        'last_time_uploaded':0,
        'last_value':''
    },
    'alarmtemperature':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'ALARM_Temperature',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhpressureshutdownlimit':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'DH_Pressure_Shutdown',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhtempstartuplimit':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'DH_Temp_Startup',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdfaultcode':{
        'data_type':'UINT',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'VFD_Fault_DriveFault_Code',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhdischargetemperature':{
        'data_type':'UINT',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'DH_DischargeTemperature',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhmaxintakepressureforever':{
        'data_type':'UINT',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'DH_MaxIntakePressure_Forever',
        'last_time_uploaded':0,
        'last_value':''
    },
    'alarmpressure':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'ALARM_Pressure',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhtempstartupenabled':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'DH_Temp_Startup_Enabled',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdtorqueperfmode':{
        'data_type':'UINT',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'cfg_TorquePerfMode',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhwindingtemperature':{
        'data_type':'UINT',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'DH_WindingTemperature',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdmotorpoles':{
        'data_type':'UINT',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'cfg_MotorPoles',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdnameplatehp':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'cfg_NameplateHP',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdactive':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'VFD_Active',
        'last_time_uploaded':0,
        'last_value':''
    },
    'rptubingpressure':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'RP_TubingPressure',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdspeedfdbk':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'VFD_SpeedFdbk',
        'last_time_uploaded':0,
        'last_value':''
    },
    'rpmode':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'RP_Mode',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhmaxintaketemperatureforever':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'DH_MaxIntakeTemperature_Forever',
        'last_time_uploaded':0,
        'last_value':''
    },
    'spmode':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'SP_Mode',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdacceltime':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'VFD_AccelTime',
        'last_time_uploaded':0,
        'last_value':''
    },
    'tubingpressurealarmdelay':{
        'data_type':'UDINT',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'TubingPressure_Alarm_Delay',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhtooltype':{
        'data_type':'UINT',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'DH_ToolType',
        'last_time_uploaded':0,
        'last_value':''
    },
    'sppressure':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'SP_Pressure',
        'last_time_uploaded':0,
        'last_value':''
    },
    'alarmmode':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'ALARM_Mode',
        'last_time_uploaded':0,
        'last_value':''
    },
    'tubingpressureeumin':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'TubingPressure_EU_Min',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdstopmode':{
        'data_type':'UINT',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'cfg_StopMode',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdready':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'VFD_Ready',
        'last_time_uploaded':0,
        'last_value':''
    },
    'offmode':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'Off_Mode',
        'last_time_uploaded':0,
        'last_value':''
    },
    'alarmtubingpressure':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'ALARM_TubingPressure',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfddisabled':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'VFD_Disabled',
        'last_time_uploaded':0,
        'last_value':''
    },
    'tubingpressureeumax':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'TubingPressure_EU_Max',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdspeedref':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'VFD_SpeedRef',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhmaxintaketemperaturestartup':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'DH_MaxIntakeTemperature_Startup',
        'last_time_uploaded':0,
        'last_value':''
    },
    'sptemperature':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'SP_Temperature',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhpressurestartup':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'DH_Pressure_Startup',
        'last_time_uploaded':0,
        'last_value':''
    },
    'handmode':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'Hand_Mode',
        'last_time_uploaded':0,
        'last_value':''
    },
    'tubingpressurelo':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'TubingPressure_Lo',
        'last_time_uploaded':0,
        'last_value':''
    },
    'runpermissive':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'Run_Permissive',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdmaxfreq':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'cfg_MaxFreq',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhtempshutdownenabled':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'DH_Temp_Shutdown_Enabled',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhpressureshutdownenabled':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'DH_Pressure_Shutdown_Enabled',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhintakepressure':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'DH_IntakePressure',
        'last_time_uploaded':0,
        'last_value':''
    },
    'rppressure':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'RP_Pressure',
        'last_time_uploaded':0,
        'last_value':''
    },
    'rpremote':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'RP_Remote',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdnameplatefla':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'cfg_NameplateFLA',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdfaultcommerror':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'VFD_Fault_CommError',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdfault':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'VFD_Fault',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhpsirating':{
        'data_type':'UINT',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'DH_PSIRating',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdatspeedref':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'VFD_AtSpeedRef',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhnumchannels':{
        'data_type':'UINT',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'DH_NumChannels',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfddcbusvoltage':{
        'data_type':'REAL',
        'change_amount':5.0,
        'max_time_between_uploads':3600,
        'tag':'VFD_DCBusVoltage',
        'last_time_uploaded':0,
        'last_value':''
    },
    'tubingpressuretransducerenabled':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'TubingPressure_Transducer_Enabled',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhdownholestatusint':{
        'data_type':'UINT',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'DH_DownholeStatus_INT',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhtoolvoltage':{
        'data_type':'UINT',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'DH_ToolVoltage',
        'last_time_uploaded':0,
        'last_value':''
    },
    'tubingpressurealarmstartupdelay':{
        'data_type':'DINT',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'TubingPressure_Alarm_Startup_Delay',
        'last_time_uploaded':0,
        'last_value':''
    },
    'alarmvfd':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'ALARM_VFD',
        'last_time_uploaded':0,
        'last_value':''
    },
    'automode':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'Auto_Mode',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhfluidlevel':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'DH_Fluid_Level',
        'last_time_uploaded':0,
        'last_value':''
    },
    'alarmremote':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'ALARM_Remote',
        'last_time_uploaded':0,
        'last_value':''
    },
    'spremote':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'SP_Remote',
        'last_time_uploaded':0,
        'last_value':''
    },
    'spvfd':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'SP_VFD',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdnameplaterpm':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'cfg_NameplateRPM',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdnameplateolcurrent':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'cfg_NameplateOLCurrent',
        'last_time_uploaded':0,
        'last_value':''
    },
    'startpermissive':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'Start_Permissive',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhdischargepressure':{
        'data_type':'UINT',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'DH_DischargePressure',
        'last_time_uploaded':0,
        'last_value':''
    },
    'tubingpressureok':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'TubingPressure_OK',
        'last_time_uploaded':0,
        'last_value':''
    },
    'rptemperature':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'RP_Temperature',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdoutputcurrent':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'VFD_OutputCurrent',
        'last_time_uploaded':0,
        'last_value':''
    },
    'rpvfd':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'RP_VFD',
        'last_time_uploaded':0,
        'last_value':''
    },
    'tubingpressurehisp':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'TubingPressure_Hi_SP',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdoutputvoltage':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'VFD_OutputVoltage',
        'last_time_uploaded':0,
        'last_value':''
    },
    'downholetoolenabled':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'Downhole_Tool_Enabled',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdfaultdrivefault':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'VFD_Fault_DriveFault',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdnameplatevolts':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'cfg_NameplateVolts',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhintaketemperature':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'DH_IntakeTemperature',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfdminfreq':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'cfg_MinFreq',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhtempshutdown':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'DH_Temp_Shutdown',
        'last_time_uploaded':0,
        'last_value':''
    },
    'tubingpressurehi':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'TubingPressure_Hi',
        'last_time_uploaded':0,
        'last_value':''
    },
    'vfddeceltime':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'VFD_DecelTime',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhpressurestartupenabled':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'DH_Pressure_Startup_Enabled',
        'last_time_uploaded':0,
        'last_value':''
    },
    'dhmaxintakepressurestartup':{
        'data_type':'UINT',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'DH_MaxIntakePressure_Startup',
        'last_time_uploaded':0,
        'last_value':''
    },
    'tubingpressurelosp':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'TubingPressure_Lo_SP',
        'last_time_uploaded':0,
        'last_value':''
    },
    'remoteshutdowndisabled':{
        'data_type':'BOOL',
        'change_amount':None,
        'max_time_between_uploads':3600,
        'tag':'Remote_Shutdown_Disabled',
        'last_time_uploaded':0,
        'last_value':''
    },'tubingpressure':{
        'data_type':'REAL',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'TubingPressure_In',
        'last_time_uploaded':0,
        'last_value':''
    },'startcommand':{
        'data_type':'BOOL',
        'max_time_between_uploads':3600,
        'tag':'Start_Command',
        'last_time_uploaded':0,
        'last_value':''
    },'stopcommand':{
        'data_type':'BOOL',
        'max_time_between_uploads':3600,
        'tag':'Stop_Command',
        'last_time_uploaded':0,
        'last_value':''
    },'lastshutdowncause':{
        'data_type':'UINT',
        'change_amount':0.5,
        'max_time_between_uploads':3600,
        'tag':'Last_Shutdown_Cause',
        'last_time_uploaded':0,
        'last_value':''
    }
}

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