Version 1.2
21-4-2010
SoftNC QWoperate function
Function name:
QwaOperate
Universal function for different tasks.
Input parm:
CMD : DINT;
INSTR : STRING;
Output parm:
OUTSTR : STRING;
Dependencies:
Command defines.
#define QWO_GETAPPPATH 1 //Get current application path
#define QWO_PLAYSOUND 2 //Play a wave sound file -> return
playtime in ms.
#define QWO_GETFILEINFO 3 //Get file creation data/time ans file size
#define QWO_GETTIMESTAMP 4 //Get time stamp from CPU
#define QWO_SETVOLUME 5 // Set volume on the OS
#define QWO_TIMESTAMP 6 // //Get time stamp from CPU
#define QWO_MAKESYBTABLE 7 //Force target to create new symbol table
#define QWO_TRACEPRINT 8 //Write meesage to target debug window and
workbench runtime window
#define QWO_GOHIBERNATE 20 //Hibernates machine if enabled
#define QWO_WAKEONLANXP 21 //Send a wake on lan message XP style
#define QWO_WAKEONLANVA 22 //Send a wake on lan message Vista style
#define QWO_POWEROFF 23 //Send a poweroff message to operationsystem
#define QWO_GETSECTIME 30 //Get seconds since
1.1.1970 (Dos time)
#define QWO_CONVMILSEC 31 //Return string wiht formatted date from
QWO_GETMILSEC
#define QWO_TIMESTAMPX 32//Return timestamp in hex format
Commands description
|
Define |
Cmd Value |
Description |
|
QWO_GETAPPPATH |
1 |
Return current path off target. E.G. "C:\plc\softNC" |
|
QWO_PLAYSOUND |
2 |
Play a wave sound file -> return
playtime in ms. |
|
QWO_GETFILEINFO |
3 |
Get file creation data/time ans file size |
|
QWO_GETTIMESTAMP |
4 |
Get time stamp from CPU |
|
QWO_SETVOLUME |
5 |
Set master volume on the OS |
|
QWO_TIMESTAMP |
6 |
Get time stamp from CPU |
|
QWO_MAKESYBTABLE |
7 |
Force target to create new symbol table, for HMI
interface |
|
QWO_TRACEPRINT |
8 |
Write meesage to target debug window and
workbench runtime window |
|
QWO_GOHIBERNATE |
20 |
Hibernates machine if enabled
|
|
QWO_WAKEONLANXP |
21 |
Send WOL packet XP style.
Sample command: CMD := '000BDBC3F88B'; //Mac adress |
|
QWO_WAKEONLANVA |
22 |
Send WOL packet Vistastyle.
Sample command: CMD := 'MASK:255.255.255.0
IP:10.0.0.150 MAC:000BDBC3F88B'; |
|
QWO_POWEROFF
|
23 |
Send a power off signal to the operating system. The function will
try to aquire the requered priviliges for shotting down. This is not
supported by all windows systems
|
|
QWO_GETSECTIME
|
30 |
Get seconds since
1.1.1970
|
|
QWO_CONVMILSEC |
31 |
Return string wiht formatted date from
QWO_GETMILSEC |
|
QWO_TIMESTAMPX |
32 |
Return the same timestamp as 4 but in hex format whitch makes it esyer to convert |