Note: this tool has been recently renamed: it used to be called "plctest" but is now called "mattest". The functionality is unchanged.
For using it from a script, it's probably a good idea to use the -q option, which switches it to quiet mode. In quiet mode, plctest only outputs the requested data (and any errors).
plctest -g pt_name
If the point is a floating-point number, you'll get some strange number.
To convert it to a float, use the -f option, like this:
-f -g pt_name
It's also possible to set points, but note that only the owner of a
point can set it. You can get plctest to pretend to be the owner, but if
the real owner is already running, it will overwrite your value in short
order. So this is only useful in limited circumstances. The syntax is
similar to the above, though:
plctest -s pt_name -v value
plctest -f -s pt_name -v value
This feature is also available via a web browser. If you run
it will output a HTML table with the point names in the left column and the values in the right column. So you might have a CGI script, perhaps a bit like this:
#!/bin/sh cd .../mat/demo/basic echo Content-type: text/html echo "" ../../tools/run/plctest -dhOr, more sophisticated:
#!/bin/sh cd .../mat/demo/basic echo Content-type: text/html echo Refresh: 10 echo Pragma: no-cache echo "" cat preamble ../../tools/run/plctest -dh cat postamble
plctest -u pt_name
plctest -w synchpt_name
$Date: 2005/05/07 07:43:45 $