WAGO-I/O-SYSTEM 750
Appendix 287
758-874/000-131 WAGO-I/O-IPC-C6
Manual
Version 1.0.0
Program block
(* Register new OID with Integer value *)
IF bRegisterOID_INT32 = TRUE THEN
wError := snmpRegisterCustomOID_INT32(sOID1, iValue, FALSE);
bRegisterOID_INT32 := FALSE;
END_IF;
(* Register new OID with OctetString value*)
IF bRegisterOID_STRING = TRUE THEN
wError := snmpRegisterCustomOID_STRING(sOID2, sValue, FALSE);
bRegisterOID_STRING := FALSE;
END_IF;
(* Register new OID with UInteger value *)
IF bRegisterOID_UINT32 = TRUE THEN
wError := snmpRegisterCustomOID_UINT32(sOID3, uiValue, FALSE);
bRegisterOID_UINT32 := FALSE;
END_IF;
(* Set Integer value *)
IF bSetValueOID_INT32 = TRUE THEN
wError := snmpSetValueCustomOID_INT32(sOID1, 1);
bSetValueOID_INT32 := FALSE;
END_IF;
(* Set OctetString value *)
IF bSetValueOID_STRING = TRUE THEN
sValue := 'hello wolrd';
wError := snmpSetValueCustomOID_STRING(sOID2, sValue);
bSetValueOID_STRING := FALSE;
END_IF;
(* Set UInteger value *)
IF bSetValueOID_UINT32 = TRUE THEN
wError := snmpSetValueCustomOID_UINT32(sOID3, 1);
bSetValueOID_UINT32 := FALSE;
END_IF;
(* Get Integer value *)
IF bGetValueOID_INT32 = TRUE THEN
wError := snmpGetValueCustomOID_INT32(sCustomOID1, iValue);
bGetValueOID_INT32 := FALSE;
END_IF;
(* Get OctetString value *)
IF bGetValueOID_STRING = TRUE THEN
wError := snmpGetValueCustomOID_STRING(sOID2, sValue);
bGetValueOID_STRING := FALSE;
END_IF;