Applies To: |
|
Summary: |
I would like to be able to call Cicode functions from another application using DDE. I would also like to be able to write to PLC registers in the same way. |
Solution: | ||||||||||||||||||||||||||||||||||||||||||||||||
Cicode can be called from another
application using DDE. The following example is an Excel macro that
will call Citect via DDE and get Citect to display the alarm page
using the "PageAlarm()" Cicode function.
The cell "1B" must be named as "Channel". This is done in "Formula - Define name" in Excel.
You can also call a Cicode function to set a PLC variable as follows: /* This Cicode function will be called by
DDE to set
END This Excel macro will call the "SetVariableA()" Cicode function and pass the value "80" to the function.
For more details on Excel macros, see the Excel macro manual. If your are using another application, substitute the equivalent DDE functions from your application for the ones used above. Note that you must place the name of the Cicode function in square [] brackets, and you can call more than one function at a time by placing extra function calls, eg [PageMenu()][AlarmAck(0,0)]. |
Keywords: |
Related Links
Attachments