man8/PPCItask

Table of Contents

Name

PPCItask - Precision Pulse Current Integrator service

Synopsis

PPCItask <argument list>

Description

Precision pulse integrator control program.

This program controls one PPCI. Normally a copy of this program is run for each PPCI in the system.

This program is part of the NEC AMS dosimetry system.

Arguments

Argument processing is done using Unix long argument syntax.

The values of all of the parameters listed here (whether or not they were supplied on the command line) are printed on stderr when the program starts.

--dbman_host <hn>

The host where dbman is running.

The environment variable DBMAN_HOST is used if present.

If this argument is not supplied and DBMAN_HOST is not set the default is "localhost".

--dose_host <hn>

The host where DOSEserv is running.

The environment variable DOSE_HOST is used if present.

If this argument is not supplied and DOSE_HOST is not set the default is "localhost".

--mbs_host <hn>

The host where MBSseqTask is running.

The environment variable MBS_HOST is used if present.

If this argument is not supplied and MBS_HOST is not set the default is "localhost".

--<bd> <C>

The board address of the PPCI to be controlled.

If this argument is not supplied the default is 0.

--dev <dev>

The KBUSS device to open.

If this argument is not supplied the default is "/dev/kbuss".

--mngr <fn>

The pathname to the CONFLIST configuration file used by the program.

If this argument is not supplied the default is "./MNGRconf".

--mngr_pn <name>

The program name to use when loading the CONFLIST configuration file.

This allows the configuration information for several PPCIs to be stored in one file.

If this argument is not supplied the default is "PPCItask".

--diag

If this argument is present stdin and stdout are left open and the program may be killed by SIGINT.
--verbose=<n>

This argument causes more information to printed to stderr. For example, the CONFLIST table is printed.

The argument <n> is optional. If it is not present the verbosity level defaults to 1.

If <n> is used the = must be present.

--help

Print PPCItask’s internal help to stderr.

UNIX signal behavior

Sending SIGHUP to the program causes it to print the in memory CONFLIST information to stderr. This is a diagnostic.

Integrator operation

Current source operation

MNGRconf parameters

Four groups are used by the program.

g1 - integrator channel 1 controls
g2 - integrator channel 2 controls
g3 - current source controls
g4 - master controls

The parameter names are shown below as "<func> <idx>".

Please see libmngr(3mngr) for general information on the format and usage of parameters of this type.

Unless specified otherwise below, the Preset field is not used and may be left blank.

Integrator channel parameters

The PPCI has two integrator channels. As explained above channel one uses g1 and channel two uses g2. The parameter lists are otherwise identical for the two channels.
file1 0 - optional

This associates an integrator channel with a cup in the DOSE system. The association is used when passing logging file names down from higher layers to determine which filename is used for logging the information generated by the PPCI.

The value is placed in the Label field. The RefName field may be left blank.

Valid values are:

le_cup1
le_cup2
le_cup3
le_cup4
le_cup5
le_cup6
he_cup1
he_cup2
he_cup3
he_cup4
he_cup5

he_cup6

If this parameter is missing a file will not be produced when PPCItask is asked to do so by the DOSE system.

comm1 0 - required

Integrator range control.

Valid values are:

0.0 - range0
1.0 - range1
2.0 - range2
3.0 - range3
4.0 - range4
5.0 - range5
6.0 - range6
7.0 - range7
8.0 - range8
9.0 - range9

The control key should be set to IDecE.

Permissions and ownership of the parameter do not matter to PPCItask.

comm2 0 - required

Input enable control.

This controls a relay in the front end of the integrator which grounds the input or routes it to the integrator front end.

Valid values are:

0.0 - ground
1.0 - input

There are several possible control keys which may be used. However, the usual value is IncN.

Permissions and ownership of the parameter do not matter to PPCItask.

comm3 0 - optional

Front end offset control.

This control is used to null out offset in the integrator front end.

See the section "Analog control configuration" for information on configuring this parameter.

Normally this control is set by PPCItask when a new range is selected. At this time the parameter isn’t write locked so it can be adjusted by the user but it’s probably better not to do this.

comm4 0 - optional

Autorange initiation control.

Valid values are:

0.0 - nop
1.0 - start

The control key should be set to Mom.

Permissions and ownership of the parameter do not matter to PPCItask.

resp1 0 - optional

Integrator voltage read.

This is the "raw" deltaV from the integrator. The value comes from the integrator’s pvm register.

See the section "Voltage read configuration" for information on configuring this parameter.

resp1 1 - optional

Software corrected integrator voltage read.

This is the integrator voltage after software correction is applied.

See the section "Voltage read configuration" for information on configuring this parameter.

resp1 2 - optional

Integrator current read.

resp1 3 - optional

Software corrected integrator average voltage read.

See the section "Voltage read configuration" for information on configuring this parameter.

resp1 4 - optional

Integrator average current read.

resp1 5 - optional

Integrator PvmL voltage read.

See the section "Voltage read configuration" for information on configuring this parameter.

resp1 6 - optional

Integrator PvmH voltage read.

See the section "Voltage read configuration" for information on configuring this parameter.

resp2 0 - optional

Number of words presently in the FIFO.

resp3 0 - optional

The FIFO status.

resp4 0 - optional

Autoranging status read.

Valid values are:

0.0 - nop
1.0 - active

The usual control key is RSet although this doesn’t really matter to PPCItask.

Permissions and ownership of the parameter must be such that PPCItask can write to the data point.

Current source parameters

The PPCI contains a current source. As explained above the current source parameters use g3.

comm1 0 - optional

Current control.

NOTE: this parameter is marked "optional" because the program will function without it. It is, however, needed if one expects to use the current source in the intended manner.

comm2 0 - optional

Range control.

This control chooses the current source range.

There are 6 ranges:

0.0 - off
1.0 - +/-100nA
2.0 - +/-1uA
3.0 - +/10uA
4.0 - +/100uA
5.0 - +/1mA

In "norm" mode the value of this parameter is set when the current control (comm1) is changed.

In "raw" mode this control may be directly adjusted.

comm3 0 - optional

Vernier control.

This control adjusts the output of the current source within one range.

In "norm" mode the value of this parameter is set when the current control (comm1) is changed.

In "raw" mode this control may be directly adjusted.

See the section "Analog control configuration" for information on configuring this parameter.

comm4 0 - optional

Offset control.

This control is used to null out offset in the current source.

In "norm" mode the value of this parameter is set when the current control (comm1) is changed.

In "raw" mode this control may be directly adjusted.

See the section "Analog control configuration" for information on configuring this parameter.

comm5 0

Mode control.

This chooses between "norm" operation, i.e. the current control parameter is used to control the current source, and "raw" mode where the range, vernier, and offset controls are used to control the current source.

Valid values are:

0.0 - norm
1.0 - raw

There are several possible control keys which may be used. However, the usual value is IncN.

Permissions and ownership of the parameter do not matter to PPCItask.

comm6 0

Enable control.

Valid values are:

0.0 - off
1.0 - internal
2.0 - external
3.0 - not used

The usual control key is IDecE.

Permissions and ownership of the parameter do not matter to PPCItask.

comm7 0

Output steering control.

Valid values are:

0.0 - off
1.0 - adcA
2.0 - adcB
3.0 - aux

The usual control key is IDecE.

Permissions and ownership of the parameter do not matter to PPCItask.

resp1 0

Current source status.

Valid values are:

0.0 - ok
1.0 - +lim
2.0 - -lim
3.0 - not_used

The usual control key is RSet although this doesn’t really matter to PPCItask.

Permissions and ownership of the parameter must be such that PPCItask can write to the data point.

Master control parameters

These are parameters which affect the operating mode of the integrator, or the operation of PPCItask.

As explained above the master control parameters use g4.

comm1 0

Integrator operating mode.

This chooses between operating as two separate integrator channels, i.e. "normal mode" or operation in a mode where the channel one integrator front end and ADC is shared between the FIFO fifo backends, i.e. "dual integrate mode".

Valid values are:

0.0 - norm
1.0 - dual

There are several possible control keys which may be used. However, the usual value is IncN.

Permissions and ownership of the parameter do not matter to PPCItask.

comm2 0

Software reset control.

file1 0 - optional

This associates the integrator with a diagnostic file name in the DOSE system. The association is used when passing logging file names down from higher layers to determine which filename to use for logging diagnostic information generated by the PPCI.

The value is placed in the Label field. The RefName field may be left blank.

Valid values are:

diag1
diag2
diag3
diag4

Analog control configuration

PPCItask uses several analog controls. These controls are usually "virtual" parameters in the AccelNET database.

In this case this means that all access to the parameters uses the Label/Refname for access and no use is made of the "data" interface.

As a consequence of this the DATA record DrvKey is usually set to "VIRT" (hence the name virtual parameter) and the DevKey is set to "NULL".

The PPCI hardware uses 16 bit bipolar DACs for these parameters.

Many times virtual parameters are defined in the AccelNET database with the DATA record DTkey field set to "F" and M and B are set to 1.0 and 0.0 in the DESC record.

In this case it is recommended that these parameters instead be set up as follows:

DATA.DTkey = U

DESC.DataType = Lin
DESC.CrtKey = F4
DESC.CtlKey = RSet
DESC.Size = 16
DESC.Offset = 0
DESC.DRkey = I
DESC.MBconvKey = Y
DESC.MBsetIncKey = Y
DESC.SpanMin = -100.0
DESC.SpanMax = 100.0
DESC.PhyMin = -100.0
DESC.PhyMax = 100.0

This allows the database to quantize the numbers sent to PPCItask such that the physical values fall on the binary steps of the hardware.

The physical range expected by PPCItask for these parameters is -100.0 to 100.0 percent. CrtKey should be set to F4 to provide enough resolution to see all of the binary steps.

Voltage read configuration

PPCItask provides several voltage readbacks. These readbacks are "virtual" parameters in the AccelNET database. See the "Analog Control configuration" section above for more explanation of virtual parameters.

In this case most of the usual virtual parameter configuration ideas apply. They may be configured like this;

DATA.DTkey = F

DESC.DataType = Lin
DESC.CrtKey = F4
DESC.CtlKey = RSet
DESC.Size = 32
DESC.Offset = 0
DESC.DRkey = I
DESC.MBconvKey = N
DESC.MBsetIncKey = N
DESC.SpanMin = -10.0
DESC.SpanMax = 10.0
DESC.PhyMin = -10.0
DESC.PhyMax = 10.0
DESC.M = 1.0
DESC.B = 0.0
DESC.IncVal = 0.0 (this isn’t used)

The physical range expected by PPCItask for these parameters is -10.0 to 10.0 volts. Setting CrtKey to F4 provides enough resolution to see all of the binary steps. However, in practice this may be a bit too much resolution due the noise floor of the system.

Current read configuration

PPCItask provides two current readbacks for each channel. These readbacks are "virtual" parameters in the AccelNET database. See the "Analog Control configuration" section above for more explanation of virtual parameters.

In this case most of the usual virtual parameter configuration ideas apply. They may be configured like this;

DATA.DTkey = F

DESC.DataType = Lin
DESC.CrtKey = E4
DESC.CtlKey = RSet
DESC.Size = 32
DESC.Offset = 0
DESC.DRkey = I
DESC.MBconvKey = N
DESC.MBsetIncKey = N
DESC.SpanMin = -1.0
DESC.SpanMax = 1.0
DESC.PhyMin = -1.0
DESC.PhyMax = 1.0
DESC.M = 1.0
DESC.B = 0.0
DESC.IncVal = 0.0 (this isn’t used)

The physical range for these parameters is set to -1.0 to 1.0 amperes.

Setting CrtKey to E4 easily provides enough resolution to see all of the binary steps. However in practice this may be a bit too much resolution due the noise floor of the system.

I/O polling rates

Polling is normally performed at 1Hz. Fast polling at 10Hz is supported.

MNGRconf file example


#
#     PPCItask sample MNGRconf file
#
#
# integrator channel 1
he_PPCItask|g1|file1 |0|he_cup1 | |
he_PPCItask|g1|comm1 |0|KINT 1 |GainSC |
he_PPCItask|g1|comm2 |0|KINT 1 |EnableSC|
he_PPCItask|g1|comm3 |0|KINT 1 |Offset |
he_PPCItask|g1|resp1 |0|KINT 1 |VR |
he_PPCItask|g1|resp1 |1|KINT 1 |VRcorr |
he_PPCItask|g1|resp1 |2|KINT 1 |CR |
he_PPCItask|g1|resp1 |3|KINT 1 |VRavg |
he_PPCItask|g1|resp1 |4|KINT 1 |CRavg |
he_PPCItask|g1|resp1 |5|KINT 1 |VRpvmL |
he_PPCItask|g1|resp1 |6|KINT 1 |VRpvmH |
he_PPCItask|g1|resp2 |0|KINT 1 |FIFOcnt |
he_PPCItask|g1|resp3 |0|KINT 1 |FIFOstat|
he_PPCItask|g1|read1 |0|KGATE 5|DeltaT |
#
#
# integrator channel 2
he_PPCItask|g2|file1 |0|he_cup2 | |
he_PPCItask|g2|comm1 |0|KINT 2 |GainSC |
he_PPCItask|g2|comm2 |0|KINT 2 |EnableSC|
he_PPCItask|g2|comm3 |0|KINT 2 |Offset |
he_PPCItask|g2|resp1 |0|KINT 2 |VR |
he_PPCItask|g2|resp1 |1|KINT 2 |VRcorr |
he_PPCItask|g2|resp1 |2|KINT 2 |CR |
he_PPCItask|g2|resp1 |3|KINT 2 |VRavg |
he_PPCItask|g2|resp1 |4|KINT 2 |CRavg |
he_PPCItask|g2|resp1 |5|KINT 2 |VRpvmL |
he_PPCItask|g2|resp1 |6|KINT 2 |VRpvmH |
he_PPCItask|g2|resp2 |0|KINT 2 |FIFOcnt |
he_PPCItask|g2|resp3 |0|KINT 2 |FIFOstat|
he_PPCItask|g2|read1 |0|KGATE 7|DeltaT |
#
#
# current source
he_PPCItask|g3|comm1 |0|KISRC 1 |CC |
he_PPCItask|g3|comm2 |0|KISRC 1 |Range |
he_PPCItask|g3|comm3 |0|KISRC 1 |Vernier |
he_PPCItask|g3|comm4 |0|KISRC 1 |Offset |
he_PPCItask|g3|comm5 |0|KISRC 1 |ModeSC |
he_PPCItask|g3|comm6 |0|KISRC 1 |EnableSC|
he_PPCItask|g3|comm7 |0|KISRC 1 |OutputSC|
he_PPCItask|g3|resp1 |0|KISRC 1 |IsrcCmSR|
#
#
# master controls
he_PPCItask|g4|comm1 |0|KINT 1 |ModeSC |
he_PPCItask|g4|comm2 |0|KINT 1 |ResetSC |

Examples

#
# Example startup for PPCItask
#
# dbman is running on the same host as PPCItask i.e. "localhost"
#
# MBSseqTask is running on the same host as PPCItask i.e. "localhost"
#
# DOSEserv is running on the same host as PPCItask i.e. "localhost"
#
# This example uses all of the arguments even though many
# of the argument values are the same as the defaults and
# therefore do not need to be specified.
#
# The MNGRconf file is located in /AccelNET/demo/config/PPCIconf
#
# The arguments are continued on multiple lines to avoid
# having the man page formatting wrap them.
#


PPCItask --dbman_host localhost --dose_host localhost \
--mbs_host localhost --dev /dev/kbuss \

-

-

mngr /AccelNET/demo/config/PPCIconf --mngr_pn he_PPCItask

Manual page revision

$Id: PPCItask.8,v 1.4 2009/02/03 20:35:08 kitchen Exp $


Table of Contents