Technical FAQs

Ask a Question

Is it possible in SCADA to link the variable tag to "Bit" in a "WORD", I/O device setting is (OPC factory server)? (example "%M101.1" as the address of TAG).

OPC protocol is a tag based addressing, so you cannot use modbus address like %M101.1 when using OPC.

If the requirement is to extract bit from word, so here it is the below solutions.
- If you are using unity software, create variables with address inside unity like %MW101.0 and link the file to OFS. so you will have bit information to OPC client automatically.

- Else you read word directly from device with tag based addressing and later use script in scada to extract bit from word. Am not sure what scada and PLC programming software you are using. But my below answer is based on OFS, Vijeo citect and unity software.

// Read an indivual bit number (0-31) from an integer and return
// the state (0 or 1)
INT
FUNCTION
BitRead(INT iValue, INT iBitNo)
RETURN (iValue BITAND Pow(2, iBitNo)) <> 0;
END

- Last solution is to change protocol type ot modbus TCPIP so that its easir for you read directly without using OFS.
Was this helpful?
What can we do to improve the information ?