Data assembling and splitting

Hello,

There are some data assembling and splitting blocks in “Safety IEC 61131-3” group, like “BYTES_TO_WORD”, “WORDS_TO_DWORD”. However, the PLC I am working on does not support these block.
From what I feeling, these blocks do the normally data conversion in the memory like most of the PLCs do. Why are not these blocks provided in the normal “IEC61131-3” group? Where can I find the library for these block?

Thanks

Hello, Not sure why the developers felt the need to include these Safety functions, with no equivalents for non-safety PLCs. In any case these are very simple functions, and the same thing can be achieved in one or two lines of ST, for example:

(* Assemble two BYTE values into one WORD *)  
> MyWord.B0 := MyByte1;  
> MyWord.B1 := MyByte2;

(* Assemble two WORD values into one DWORD *)  
> MyDword.W0 := MyWord1;  
> MyDword.W1 := MyWord2;

(* Alternatively, in one line, something like: *)  
> MyWord := SHL(TO_WORD(MyByte2), 8) OR MyByte1;  
> MyDword := SHL(TO_DWORD(MyWord2), 16) OR MyWord1;

Hope this helps. ~ Martin.