REQUEST and POKE

Atom values can be read (REQUEST) or written explicitly (POKE), while the I/O mode and attributes can only be read since they are fixed at configuration time.

VBA example

Assume you want to read the process value of the object, q1, and then change its set point to 22.0. You would then write the following code:

Sub DDE()

Dim chan As Long

Dim val As String

 

chan = DDEInitiate("IGSS_DDE", "q1")

val = DDERequest(chan, "value")

Debug.Print val

DDEPoke chan, "setpoint", "22.0"

val = DDERequest(chan, "setpoint")

Debug.Print val

DDETerminate chan

End Sub

 

DDEInitiate establishes a conversation to the server "IGSS_DDE" and the topic "q1".
When the conversation is established, the item "VALUE" can be requested and the set point can be changed (DDEPoke line).
After all is done the conversation is closed (DDETerminate). You can make as many transactions on an object as needed as long as the conversation is open.