📜  ST DWORD_TO_WORD - 任何代码示例

📅  最后修改于: 2022-03-11 14:58:32.492000             🧑  作者: Mango

代码示例1
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));