fabiodasilveira - 15 hours ago

Hello Everyone,

I am really struggling to understand why codesys would present an error regarding the following:

VAR
strByte1: STRING(10):= '192';
strByte2: STRING(10):= '168';
strByte3: STRING(10):= '1';
strByte4: STRING(10):= '0';
strIPAddress: STRING:= '192.168.1.1';
END_VAR

//Updating Variables
strByte1:= BYTE_TO_STRING(GVL.abyPSsIpAddress[0]);
strByte2:= BYTE_TO_STRING(GVL.abyPSsIpAddress[1]);
strByte3:= BYTE_TO_STRING(GVL.abyPSsIpAddress[2]);
strByte4:= BYTE_TO_STRING(GVL.abyPSsIpAddress[3]);
strIPAddress:= CONCAT(strByte1, CONCAT('.', CONCAT(strByte2, CONCAT('.',
CONCAT(strByte3, CONCAT('.', strByte4))))));

Any help would be much appreciated.

 

Related

Talk.ru: 1
Talk.ru: 2
Talk.ru: 3