nmake
Run a sample program
The API process name must be stored in the PRCNAM environment variable for a sample program to run. The name is an arbitrary character string of up to 10 characters. To create PRCNAM, enter the following command in the Command Prompt window:
set PRCNAM=<
name>
Where
<
name
>
is the API process name.
To run a sample program, following the instructions below.
Review sample programs
The following sample programs demonstrate how point information is collected on the system.
|
Program
|
Illustrates collecting:
|
|
ptq_snap.c
|
Data via SNAPSHOT requests.
The application receives only the point data value when the request is processed.
|
|
ptq_onchange.c
|
Data via ONCHANGE requests.
The application receives the current point data value, and then receives an updated point data value whenever the data value changes.
|
|
ptq_onchgstru.c
|
Data from structure points via ONCHANGE requests
|
|
ptm_monitor.c
|
Multiple points via ONCHANGE requests
|
The following sample programs demonstrate how point values can be modified.
|
Program
|
Illustrates changing:
|
|
ptq_setpoint.c
|
Point values using raw data values
|
|
ptq_setpt_eu.c
|
Point values using data values expressed in engineering units
|
|
ptm_script.c
|
Multiple point values using raw data values
|
When you run any of the PTQ programs, you will be prompted to enter a Point ID.
- The point ID that you specify must be:
- For a point that has been configured through the application configuration functions.
- Defined in the current running project.
If the point is not in the current running project, an error message such as "Null Point Address" is displayed.
- The system must be updated with that configuration data.
Before you run any of the test programs (or one of your own applications), you must always be sure that the CIMPLICITY processes have completed their startup.
Note: When you run the
ptm_monitor
and
ptm_script
programs, you will be prompted for an input file to be used. Sample
monitor.input
and
script.input
files are provided for references.