DDE Examples for
InTouch 5
Controlling WinWedge from InTouch
(i.e. to send commands and data out the serial port from InTouch)
InTouch 5.0 (and above) introduced the WWExecute function. This
function can be used to automate other Microsoft Windows programs
from Wonderware InTouch. WinWedge can be used to send data out the
PC serial port directly from InTouch.
For example, to send the ASCII Char 27 out of port COM1, use the
following InTouch script:
WWExecute (" Winwedge "," Com1 "," {SENDCODE(27)} " ) ;
To Toggle the DTR signal which is usually used to hang up on a
modem, execute the following InTouch statement:
WWExecute (" WinWedge ", " Com1 ", " {TOGGLEDTR} " ) ;
Once the modem is off the hook, the following InTouch statement can
be execute to dial the modem : WWExecute (" WinWedge ", " Com1 ", "
{SEND(ATDT 555-1212)} " ) ;
WWExecute (" WinWedge ", " Com1 ", " {SENDCODE(13)} " ) ;
WWExecute (" WinWedge ", " Com1 ", " {SENDCODE(10)} " ) ;
The above three statements can also be combined into the following
single statement:
WWexecute ("WinWedge", "Com1", "{SEND(ATDT 555-1212" + StringChar(13)
+ StringChar(10) + " ) } " ) ;
Refer to WinWedge manual under the
WinWedge DDE Command Set for other commands. |