Skip to main content

isNotEqualTo

Short summary

This assertion method checks if minimal one byte of memory of data and dataToCompare is not equal

Attention: Binary comparison means it compares values byte by byte, regardless of type information (signs, REAL etc...) and it compares padding bytes, too.

Attention: STRING and WSTRING is null terminated that means TwinCAT sets null byte/word at the end of the string and touches nothing else For example foo :STRING(3) := 'foo'; looks binary 16#66 16#6F 16#6F 16#00. if you set foo to an empty string foo := '' it looks like 16#00 16#6F 16#6F 16#00.

Parameters

NameTypeCommentKind
dataANYcurrent binary datainput
dataToCompareANYbinary data with the unexpected valuesinput
messageAssertMessagemessage if the assertion is falseinput

Code

Declaration

METHOD isNotEqualTo
VAR_INPUT
(* current binary data *)
data :ANY;
(* binary data with the unexpected values *)
dataToCompare :ANY;
(* message if the assertion is false *)
message :AssertMessage;
END_VAR