How does TwinCAT-3 read and write the registry? Beckhoff TwinCAT (Beckhoff) basic tutorial TwinCAT-3 read and write registry


sSubKey refers to the path of the registry
sValName refers to the name of the name-value pair to be written to the registry
eValType is an enumerated type (and not a regular enumerated type). You can enter eValType. XXX to view all types, but in fact, just copy it.
cbData is the data to be written (LEN(XXX), where XXX is a string type, and we must return the length using the LEN method in the same format)
The dataToWrite is the pointer address of the data to be written (similar to ADR(XXX), where XXX is the string type variable in front)
















You can test writing to the registry (note that you need to refresh the registry)






























































'
At the same time, the values modified in the registry can also be collected in TwinCAT