##PROJECT_GLOBAL_BEGIN [Programs] Count=1 [Misc Info] Author= Company= Version=1.0 EditTime=15351 CyProVersion=2.7.1 [Protection] Level=0 Password= ##PROJECT_GLOBAL_END ##PROGRAM_BEGIN_1 #PROJECT_OPTIONS_BEGIN [Program] Name=New Program [VCP] I2CPriority=5 SendSource=1 SendAlloc=1 ProtectWithPasswd=0 Password= IORefresh=3 ScanOverrunStopsProgram=1 Com1Mode=1 Com1Baudrate=19200 Com1Data=0 Com2Mode=1 Com2Baudrate=19200 Com2Data=0 HSCMode=0 EthAbusEnable=1 EthModbusEnable=0 WANUrl= PushEvent=0 PushUrl= ModbusDelay=20 ModbusDeviceAddress=1 ModbusPLCDataModel=2 ModbusAddress=0 ModbusRegisterCount=1 ModbusCoilsArrayVar= ModbusRegistersArrayVar= PLCCoilVars= PLCRegisterVars= ModbusCoilAddresses= ModbusRegisterAddresses= [Misc Info] MonitorHistorySpeed=10 [Hardware] CPUUnit=4 [Net] PrgDevice00=1000 CurrentNAD=1000 [Monitor01] VarCount=12 VarName1=industry_onoff VarBase1=1 VarValue1=0 VarColor1=0 VarIndex1=0 VarName2=industry_boiler_level VarBase2=1 VarValue2=0 VarColor2=0 VarIndex2=1 VarName3=industry_chimney VarBase3=1 VarValue3=0 VarColor3=0 VarIndex3=2 VarName4=industry_steam_tank VarBase4=1 VarValue4=0 VarColor4=0 VarIndex4=3 VarName5=industry_steam_fan VarBase5=1 VarValue5=0 VarColor5=0 VarIndex5=4 VarName6=industry_water_input VarBase6=1 VarValue6=0 VarColor6=0 VarIndex6=5 VarName7=industry_grains_input VarBase7=1 VarValue7=0 VarColor7=0 VarIndex7=6 VarName8=industry_output_1 VarBase8=1 VarValue8=0 VarColor8=0 VarIndex8=7 VarName9=industry_output_2 VarBase9=1 VarValue9=0 VarColor9=0 VarIndex9=8 VarName10=industry_output_3 VarBase10=1 VarValue10=0 VarColor10=0 VarIndex10=9 VarName11=industry_output_fan VarBase11=1 VarValue11=0 VarColor11=0 VarIndex11=10 VarName12=industry_return VarBase12=1 VarValue12=0 VarColor12=0 VarIndex12=11 #PROJECT_OPTIONS_END #DMVARSLIST_BEGIN #DMVARSLIST_END #MASKS_BEGIN #MASKS_END #CODE_BEGIN // AllocGroupList="User Variables", "I/O Variables", "Constants" var scene_1: bool; scene_2: bool; scene_3: bool; scene_4: bool; lc00_qx00: bool; lc00_qx01: bool; lc00_qx02: bool; lc00_qx03: bool; lc00_qx04: bool; lc00_qx05: bool; lc00_qx06: bool; lc00_qx07: bool; lc00_qx08: bool; lc00_qx09: bool; industry_boiler_req: bool; industry_steam_tank: bool; industry_steam_fan: bool; industry_grains_input: bool; industry_water_input: bool; industry_boiler_level: int; industry_output_1: bool; industry_output_2: bool; industry_output_3: bool; industry_output_fan: bool; industry_return: bool; industry_chimney: bool; level: int; var_end; function main:void; language 'Structured Text'; // AllocGroupList="User Variables" begin // cybro droid iq demo if fp(scene_1) then scene_2:=0; scene_3:=0; scene_4:=0; elsif fp(scene_2) then scene_1:=0; scene_3:=0; scene_4:=0; elsif fp(scene_3) then scene_1:=0; scene_2:=0; scene_4:=0; elsif fp(scene_4) then scene_1:=0; scene_2:=0; scene_3:=0; end_if; // cybro droid industry demo if fp(industry_boiler_req) then if industry_steam_tank and industry_grains_input and industry_output_1 and industry_output_1 and industry_output_2 and industry_output_3 then industry_steam_tank:=0; industry_grains_input:=0; industry_boiler_level:=0; industry_output_1:=0; industry_output_2:=0; industry_output_3:=0; else industry_steam_tank:=1; industry_grains_input:=1; industry_boiler_level:=10; industry_output_1:=1; industry_output_2:=1; industry_output_3:=1; end_if; industry_boiler_req:=0; end_if; industry_steam_fan:=industry_steam_tank; industry_water_input:=industry_steam_tank and industry_grains_input; industry_output_fan:=industry_output_1 or industry_output_2 or industry_output_3; industry_return:=industry_output_fan and clock_10s; industry_chimney:=(industry_boiler_level>0); if industry_boiler_level==0 then industry_output_1:=0; industry_output_2:=0; industry_output_3:=0; end_if; level:=100*(industry_steam_tank and industry_grains_input)-25*industry_output_1-25*industry_output_2-25*industry_output_3; if industry_boiler_levellevel then industry_boiler_level:=industry_boiler_level-fp(clock_100ms); end_if; end; #CODE_END #DESCRIPTION_BEGIN #DESCRIPTION_END ##PROGRAM_END_1