📜  ST DINT 到 2 WORD - 无论代码示例

📅  最后修改于: 2022-03-11 14:57:54.838000             🧑  作者: 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));