FUNCTION RandomUDINT : UDINT VAR bMarlonRando : UDINT; mbs : CmpCrypto.CmpCrypto_Interfaces.RtsByteString := (ui32Len := 4, ui32MaxLen := 4, pByData := ADR(bMarlonRando)); Result : CmpCrypto.CmpCrypto_Implementation.CmpCrypto_Interfaces.SysTypes.RTS_IEC_RESULT; END_VAR
//Requires CmpCrypto library //Requires device vendor to have included Crypto component in Runtime Result := CmpCrypto.CryptoGenerateRandomNumber(ui32NumOfRandomBytes:= 4, pRandom:= ADR(mbs)); RandomUDINT := bMarlonRando;
Thanks!
Last edit: aliazzz 2020-08-28