6/22/2011 7:51 AM | |
Posts: 6 Rating: (0) |
Hello all, I have a project that I must send two different data type(Holding registers and Inputs) to server by Open Modbus TCP/IP redundant. and i worked with demo version of this software(2XV9450-1MB11). Can i write the code for assign parameters UNIT, WRITE_READ, DATA_TYPE, START_ADDRESS and LENGTH like this in OB1: L 3 T "CONTROL_DAT".DATA_TYPE L 1 T "CONTROL_DAT".START_ADDRESS L 18 T "CONTROL_DAT".LENGTH SET = "CONTROL_DAT".WRITE_READ L 1 T "CONTROL_DAT".UNIT CALL "MB_REDCL" , "IDB_Modbus_Client" id_0_a := id_1_a := id_0_b := id_1_b := laddr_cp0 := laddr_cp1 := check_conn_cycle:= use_all_conn := single_write := data_type_1 := db_1 := start_1 := data_type_2 := db_2 := start_2 := data_type_3 := db_3 := start_3 := data_type_4 := db_4 := start_4 := MONITOR :="CONTROL_DAT".MONITOR REG_KEY :="LICENSE_DB".REG_KEY ENQ :="CONTROL_DAT".ENQ DATA_TYPE :="CONTROL_DAT".DATA_TYPE START_ADDRESS :="CONTROL_DAT".START_ADDRESS LENGTH :="CONTROL_DAT".LENGTH WRITE_READ :="CONTROL_DAT".WRITE_READ UNIT :="CONTROL_DAT".UNIT LICENSED :="CONTROL_DAT".LICENSED BUSY :="CONTROL_DAT".BUSY DONE :="CONTROL_DAT".DONE ERROR :="CONTROL_DAT".ERROR STATUS_0A :="CONTROL_DAT".STATUS_0A STATUS_1A :="CONTROL_DAT".STATUS_1A STATUS_0B := STATUS_1B := IDENT_CODE :="CONTROL_DAT".IDENT_CODE A "CONTROL_DAT".ENQ R "CONTROL_DAT".ENQ A "CONTROL_DAT".DONE // for DONE = TRUE JCN err L "CONTROL_DAT".COUNT_DONE + 1 T "CONTROL_DAT".COUNT_DONE JC Trig err: A "CONTROL_DAT".ERROR // for ERROR = TRUE JCN nero L "CONTROL_DAT".COUNT_ERROR + 1 T "CONTROL_DAT".COUNT_ERROR Trig: SET = "CONTROL_DAT".ENQ L 2 T "CONTROL_DAT".DATA_TYPE L 1 T "CONTROL_DAT".START_ADDRESS L 159 T "CONTROL_DAT".LENGTH SET = "CONTROL_DAT".WRITE_READ L 1 T "CONTROL_DAT".UNIT CALL "MB_REDCL" , "IDB_Modbus_Client" id_0_a := id_1_a := id_0_b := id_1_b := laddr_cp0 := laddr_cp1 := check_conn_cycle:= use_all_conn := single_write := data_type_1 := db_1 := start_1 := data_type_2 := db_2 := start_2 := data_type_3 := db_3 := start_3 := data_type_4 := db_4 := start_4 := MONITOR :="CONTROL_DAT".MONITOR REG_KEY :="LICENSE_DB".REG_KEY ENQ :="CONTROL_DAT".ENQ DATA_TYPE :="CONTROL_DAT".DATA_TYPE START_ADDRESS :="CONTROL_DAT".START_ADDRESS LENGTH :="CONTROL_DAT".LENGTH WRITE_READ :="CONTROL_DAT".WRITE_READ UNIT :="CONTROL_DAT".UNIT LICENSED :="CONTROL_DAT".LICENSED BUSY :="CONTROL_DAT".BUSY DONE :="CONTROL_DAT".DONE ERROR :="CONTROL_DAT".ERROR STATUS_0A :="CONTROL_DAT".STATUS_0A STATUS_1A :="CONTROL_DAT".STATUS_1A STATUS_0B := STATUS_1B := IDENT_CODE :="CONTROL_DAT".IDENT_CODE A "CONTROL_DAT".ENQ R "CONTROL_DAT".ENQ A "CONTROL_DAT".DONE // for DONE = TRUE JCN eror L "CONTROL_DAT".COUNT_DONE + 1 T "CONTROL_DAT".COUNT_DONE JC trr eror: A "CONTROL_DAT".ERROR // for ERROR = TRUE JCN nero L "CONTROL_DAT".COUNT_ERROR + 1 T "CONTROL_DAT".COUNT_ERROR trr: SET = "CONTROL_DAT".ENQ L "CONTROL_DAT".STATUS_0A T "CONTROL_DAT".Save_STATUS_0A L "CONTROL_DAT".STATUS_1A T "CONTROL_DAT".Save_STATUS_1A JU end // save values of STATUS without ERROR = TRUE and without STATUS = A090 (status of AG_CNTRL) nero: L W#16#A090 L "CONTROL_DAT".STATUS_0A <>I JCN c1a T "CONTROL_DAT".Save_STATUS_0A_no_Error c1a: L W#16#A090 L "CONTROL_DAT".STATUS_1A <>I JCN end T "CONTROL_DAT".Save_STATUS_1A_no_Error end: NOP 0 I must describe that I set the parameter ENQ in the OB 100. please help me, thanks alot Splitted from Release of ModbusRedundanz V2.x. |
Last edited by: O_Moderator at: 6/22/2011 9:40 AMnew subject after splitting |
|
Follow us on