man8/FSmngr2

Table of Contents

Name

FSmngr2 - "dumb" foil stripper controller manager

Synopsis

FSmngr2 <argument list>

Description

This program manages an NEC "dumb" foil stripper controller mechanism.

The program registers with dbman as FSmngr2.

Arguments

Arguments are processed using Unix long argument syntax.
--mngr <fn>

The CONFLIST file from which to obtain the configuration information.

If this is not specified it defaults to "MNGRconf" in the current working directory (i.e. the directory where the program was started).

--data_path <pn>

The pathname to the directory containing a file where the current foil number and the windup direction setting are stored.

The file is in CONFIG_TBL format and is named "fs_config". If this argument is not present the current working directory is assumed. If the file is not found it is created.

--mngr_pn <fn>

The program name to use when parsing the CONFLIST file.

If this argument is not specified it generally defaults to the program name.

--show_tbl

If this argument is present the contents of the CONFLIST table is printed to stderr
--diag

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

Normally the program does it’s work silently. This sets the level of logging information. The number is optional but if provided it must include the "=". If no argument is provided the default level is 1.
0 - work silently
1 - print signon msg, option settings

Foil Changer System Description

The foil stripper drive mechanism consists of a DC motor and cam with one indentation. There is a roller switch riding on the cam. The roller switch is in the indentation when foil stripper is at a rest position. One complete rotation of the cam causes the foil stripper to advance one foil position.

The control circuit has two inputs, direction and start.

The direction control determines the direction the mechanism moves (ccw or cw) when activated.

The start control is used to start a cycle. It is asserted long enough for the cam to move out of the rest position then deasserted. The motor continues to turn until the switch again senses that the cam is at the rest position.

The direction and start controls are combined into one 2 bit control. See the ctl1 description for more information.

The program is responsible for keeping track of the foil position and managing the hardware controls to correctly move the foil stripper.

Configuration name usage

The configuration file uses the libmngr(3mngr) facility to connect internal parameters to the AccelNET database. The mappings for this program are given below.

Parameters needed by this program can be combined with parameters belonging to other programs. The "program name" field in the configuration file differentiates the entries.

FSmngr2 uses "FSmngr2" as the program name when searching the file.

FSmngr2 handles up to 4 foil strippers. One Group is assigned for each foil stripper to be managed. Groups g1, g2, g3, and g4 are used.

Parameters listed as required must be present in the config file for FSmngr2 to operate on the group.

Parameters listed as optional are not required and will be ignored or overridden by defaults as appropriate.

comm1 - required

The commanded foil number.

Usually this control is named FoilNumC in the database.

PhyMin is used as the the minimum foil number and PhyMax is used as the the maximum foil number.

An 80 position foil stripper might be set up as PhyMin=0, and PhyMax=79 or possiblly as PhyMin=1, and PhyMax=80.

The control key should be set to RSetK.

The parameter should be owned by by whatever task FSmngr2 registers as and the permissions should be set for indirect update by users and unconditional for the owner.

comm2 - required

Sets the current foil position as the "home" position, i.e. when this control is actuated the foil number is reset to the value of comm1.PhyMin but the foil is not moved.

0.0 - nop
1.0 - home

The control key should be set to Mom.

Usually this control is named IdxHmeSC in the database.

The parameter should be owned by whatever task FSmngr2 registers as and the permissions should be set for indirect update by users and unconditional for the owner.

comm3 - required

Set direction for belt windup.

0.0 - none
1.0 - reverse
2.0 - forward

When comm3=none no windup compensation is performed.

When a new commanded position (comm1) is entered FSmngr2 calculates the shortest distance from the current foil position to the new foil position and moves backwards or forward to the new position.

When comm3=reverse and FSmngr2 moves the foil stripper backwards it will move one position beyond the destination then move one position forward to compensate for windup. When the foil stripper moves foward it advances to the new position without any additional steps.

When comm3=forward the situation is reversed. When the foil stripper is moved forward it will move one position beyond the destination then move backward one step. When it moves backward it goes directly to the destination.

The best setting for comm3 depends on the orientation of the foil stripper housing.

Usually this control is named DirSC in the database.

The control key should be set to IncN or possibly IDecE.

The parameter should be owned by whatever task FSmngr2 registers as and the permissions should be set for indirect update by users and unconditional for the owner.

comm4 - optional

Interlock input.

This may be used in cases where is desired to inhibit indexing at certain times. For example, the system could be interlocked to prevent motion when beam is present. This could be done by checking that state of an upstream Faraday cup.

0.0 = inhibit indexing
1.0 = allow indexing

The control key should be set to RSet.

Usually this control is named NlkSR in the database.

Ownership and permissions for this parameter do not matter.

resp1 - required

The current foil position.

Usually this control is named FoilNumR in the database.

The parameter should be owned by whatever task FSmngr2 registers as and the permissions should be set for no update by users and direct for the owner.

resp2 - required

foil stripper status

0.0 = rest
1.0 = moving
2.0 = caution
3.0 = error

The caution value means that the move didn’t complete because of an interlock trip. The rest are self explanatory.

Usually this control is named BusySR in the database.

The control key should be set to RSet.

The parameter should be owned by whatever task FSmngr2 registers as and the permissions should be set for no update by users and direct for the owner.

read1 - required

The hardware cam status read

0.0 = out_of_position
1.0 = in_position

Usually this control is named InPosSR in the database.

Ownership, control key, and permissions for this parameter do not matter.

ctl1 - required

The hardware control to actuate the foil stripper drive. This is a 2 bit control wired with the lsb=nop/chg and the msb=rev/fwd.

Indexing is started in forward mode (see comm3) by setting the value to 0x3 (fwd/chg). After a short amount of time (6 sec) to allow the motor to move the in position switch off from the cam lobe the control is set to 0x2 (fwd/nop).

Indexing is started in reverse by setting the value to 0x1 (rev/chg). After a short amount of time (6 sec) the control is set to 0x0 (rev/nop).

Usually this control is named PosSC in the database.

The parameter should be writable by whatever task FSmngr2 registers as and the permissions should be set appropriately for FSmngr2 to write.

Many times this parameter is set so that the operator group can write to it. When FSmngr2 starts a write lock is placed on the parameter effectively preventing interference by a user.

This is convenient when setting up a new drive. The users can manipulate this control to troubleshoot the wiring etc. and when the drive mechanism is working properly FSmngr2 can be started.

Examples


#
#    MNGRconf
#
#    FSmngr2 configuration
#    for 2 foil strippers
#
FSmngr2|g1|comm1 |0|FS T -1|FoilNumC|
FSmngr2|g1|comm2 |0|FS T -1|IdxHmeSC|
FSmngr2|g1|comm3 |0|FS T -1|DirSC |
FSmngr2|g1|read1 |0|FS T -1|FoilNumR|
FSmngr2|g1|read2 |0|FS T -1|InPosSR |
FSmngr2|g1|read3 |0|FS T -1|BusySR |
FSmngr2|g1|ctl1 |0|FS T -1|PosSC |
#
#
#    post accel foil stripper
#
FSmngr2|g2|comm1 |0|FS 04-1|FoilNumC|
FSmngr2|g2|comm2 |0|FS 04-1|IdxHmeSC|
FSmngr2|g2|comm3 |0|FS 04-1|DirSC |
FSmngr2|g2|read1 |0|FS 04-1|FoilNumR|
FSmngr2|g2|read2 |0|FS 04-1|InPosSR |
FSmngr2|g2|read3 |0|FS 04-1|BusySR |
FSmngr2|g2|ctl1 |0|FS 04-1|PosSC |

Notes

The actuation time of ctl1 is hardcoded as 6 seconds. This may be changed someday.

The amount of time wait before declaring an indexer move timeout is hardcoded as 30 seconds. This may be changed someday.

The interlock scenario described in the comm4 description can also be done by interlocking the cup’s position status control to the BusySR (resp2). The BusySR state is set immediately when the program starts the move so it’s likely that the cup would drop in long before any damage could be done to the foil holder.

See Also

libmngr(3mngr)

Manual page revision

$Id: FSmngr2.8,v 1.11 2008/03/05 20:50:41 kitchen Exp $


Table of Contents