DDE Topics items for controlling CPS Plus

DDE Topics items for controlling CPS Plus

            Application: CPSPLUS
            Topic: DRIVER
            Topic Items:
                         [BEL], [UNLOADCPS]
                         [WriteToCOMn], [ResetPortn], [ExecCommandn],
                         [RTSnHI], [RTSnLOW], [DTRnHI] , [DTRnLOW
 
 
[UNLOADCPS] – shutdown CPS Plus
 
Example MS Office VBA:
 
chan = DDEInitiate("CPSPLUS", "DRIVER")
DDEExecute chan, "[UnloadCPS]" ' tell CPS to quit
DDETerminate chan
 
 
 
[BEL] – System BEL sound – useful for testing DDE connection
Example MS Office VBA:
 
chan = DDEInitiate("CPSPLUS", "DRIVER")
DDEExecute chan, "[BEL]' to verify DDE connection
DDETerminate chan
 
 
 
[WriteToCOMn(string out)]   
n= com port number (WriteToCOM1, WriteToCOM2 … WriteToCOM99)
Control codes must be supplied as ASCII values inside curly braces.
Text and ASCII codes may be entered in any combination.
 
Example: MS Office VBA 
chan = DDEInitiate("CPSPLUS", "DRIVER")
DDEExecute chan, "[WriteToCOM2(AT&F{13}{10})]"
' send SELFTEST <cr> <lf> to serial port 2
DDETerminate chan
 
 
[ExecCommandn]  Executes created manual command.
n= command number (More info : How to send data/commands to COM port)
 
Example MS Office VBA:
chan = DDEInitiate("CPSPLUS", "DRIVER")
DDEExecute chan, "[ExecCommand2]"    ' Executes saved manual command 2
DDETerminate chan
 
 
[ResetPortn]  Clear input and output buffer of port n.
n= com port number (ResetPort1, ResetPort2 … ResetPort99)
 
Example: MS Office VBA
chan = DDEInitiate("CPSPLUS", "DRIVER")
DDEExecute chan, "[ResetPort1]"    ' Clear input and output buffer of COM1
DDETerminate chan
 



 
[RTSnHI]  Set RTS line to high value (ON). Com port is specified by n.
n= com port number (RTS1HIRTS2HI … RTS256HI)
 
Example: MS Office VBA
chan = DDEInitiate("CPSPLUS", "DRIVER")
DDEExecute chan, "[RTS3HI]"    ' Sets RTS line, of COM3, to high value
DDETerminate chan
 
[RTSnLOW]  Set RTS line to low value (OFF). Com port is specified by n.
n= com port number (RTS1LOWRTS2 LOW … RTS256 LOW)
 
Example: MS Office VBA
chan = DDEInitiate("CPSPLUS", "DRIVER")
DDEExecute chan, "[RTS5LOW]"    ' Sets RTS line, of COM5, to low value
DDETerminate chan
 
[DTRnHI]  Sets DTR line to high value (ON). Com port is specified by n.
n= com port number (DTR5HI, DTR7HI … DTR256HI)
 
Example: MS Office VBA
chan = DDEInitiate("CPSPLUS", "DRIVER")
DDEExecute chan, "[DTR9HI]"    ' Sets DTR line, of COM9, to high value
DDETerminate chan
 
[DTRnLOW]  Sets DTR line to low value (OFF). Com port is specified by n.
n= com port number (DTR5LOW, DTR7LOW … DTR256LOW)
 
Example: MS Office VBA
chan = DDEInitiate("CPSPLUS", "DRIVER")
DDEExecute chan, "[DTR4LOW]"    ' Sets DTR line, of COM4, to low value
DDETerminate chan