Answers for "ST DWORD_TO_WORD"

0

ST DWORD_TO_WORD

VAR
    diInt: DINT := -2;
    dwTemp: DWORD;
    w1: WORD;
    w2: WORD;
END_VAR


dwTemp := DINT_TO_DWORD(diInt);

w1 := DWORD_TO_WORD(dwTemp);
w2 := DWORD_TO_WORD(SHR(dwTemp, 16));
Posted by: Guest on October-22-2021

Browse Popular Code Answers by Language