VAT_PM5.MAC |
[
source code |
installed at |
configured at
]
|
See other macros in category:
All
|
Description:
Macros for controlling VAT Adaptive Pressure Controller
through a serial line. The current macros have been tested with
model PM5 but should work with model PM3.
|
Documentation:
DESCRIPTION
- - Configure the serial line connected to the controler.
The default serial line configuration is 4800bauds/7bits/even
- - Configure a macro motor:
The motor will control the valve in position or in pressure.
The channel field is used to select the mode (1 for position,
2 for pressure)
"device"field set to string "vat_pm5"
"addr"field set to the serial line entry
"num"field set to 4
"type"field set to "Macro Motors"
- - Configure a macro counter (optional):
"device"field set to string "vat_pm5"
"addr"field set to the serial line entry
"num"field set to 4
"type"field set to "Macro Counter"
- - Some macros are also available
global VAT_PM5_ERR[]
VAT_PM5_ERR["000001"] = "Parity Error"
VAT_PM5_ERR["000002"] = "CR or LF is missing"
VAT_PM5_ERR["000003"] = "Semicolon is missing"
VAT_PM5_ERR["000004"] = "Wrong letter code"
VAT_PM5_ERR["000005"] = "Numerical value not given is 6 digits"
VAT_PM5_ERR["000006"] = "Numerical value larger than 1000"
VAT_PM5_ERR["000007"] = "Missing sensor, check connection"
VAT_PM5_ERR["000008"] = "Instruction given in operating mode LOCAL"
VAT_PM5_ERR["000101"] = "Error with LEARN command"
VAT_PM5_ERR["000200"] = "Error with ZERO command"
global VAT_PM5_DEV[]
|
Macros:
vatopen
Usage: vatopen [controller]
Open the valve
vatclose
Usage: vatclose [controller]
Close the valve
|
Internal Macros:
|
_vataction
Usage: _vataction (action, [controller])
Open (action == 1) or close (action == 2) the valve
vat_pm5_config
Usage: vat_pm5_config(num,type,p1,p2,p3)
Called by spec after reading the config file
vat_pm5_cmd
Usage: vat_pm5_cmd(num,key,p1,p2)
Called by spec on motor operations
_vat_pm5_getpos
Usage: _vat_pm5_getpos (dev, cmd, silent)
Returns current valve position/pressure setppint/current pressure
or -1 if error.
_vat_pm5_query
Usage: _vat_pm5_query (dev, cmd, silent)
Send command to controler and returns its answer.
_vat_pm5_err
Usage: _vat_pm5_err
Cosmetics message
_vat_pm5_warn
Usage: _vat_pm5_warn
Cosmetics message
|
Filename: | vat_pm5.mac |
Author: | MP BLISS (Original Jun/2015).
$Revision: 1.2 $ / $Date: 2016/07/21 05:51:52 $ |
Last mod.: | 21/07/2016 07:51 by perez |
|