OPCSDEFS(DOCS) Optical Printer Control System OPCSDEFS(DOCS) NAME opcsdefs - OPCS definition file format description DESCRIPTION When the opcs program is started, the 'OPCSDEFS.OPC' is loaded. This file contains commands that sets the motor and ramp speeds, channel names, custom commands, interpolation curves, etc. After startup, the LDEFS(OPCS) command can be used to load different files containing other OPCSDEFS commands, allowing users to switch to different configurations, such as switching from IMAX to 35MM shooting, or changing around a filter wheel configuration, loading different follow focus files, fader curves, etc. The commands in OPCSDEFS files are different from the OPCS(OPCS) commands, and even when names are similar between them (e.g. 'reset'), their usage and context may be quite different, such as the case with SPD(OPCS) vs. SPD(OPCSDEFS). FILE FORMAT Custom files with OPCSDEFS commands should use the extension ".def", so as to be different from files with OPCS commands which use ".run". Lines starting with '#' and blank lines are ignored. Comments can also appear after commands, e.g. ramp a 10 150 15 200 # 'A' channel ramps Leading/trailing white space in generally ignored, so you can indent commands for formatting. Multiple commands can be stacked on a line if it serves readability, e.g. # BUCKLE SENSING PORTS buckle a 0000 00 00 buckle e 0000 00 00 buckle i 0000 00 00 buckle b 0000 00 00 buckle f 0000 00 00 buckle j 0000 00 00 buckle c 0000 00 00 buckle g 0000 00 00 buckle k 0000 00 00 buckle d 0000 00 00 buckle h 0000 00 00 buckle l 0000 00 00 ..but /generally/ there should be only one command per line. Commands that start with "!" will be execute as DOS commands. OPCS commands can be run from within an OPCSDEFS file using OPCSCMD(OPCSDEFS), e.g. opcscmd cam 12 # run the camera 12 frames opcscmd go d -1000 # move the fader -1000 pulses OPCSDEFS files can load other OPCSDEFS files with e.g. opcscmd ldefs otherfile.defs DOCUMENTATION Use man -k OPCSDEFS: for a full list of the OPCSDEFS commands. With this list, you should be able to zero in on specific commands using man [command]. TRICKS WITH DEFS FILES People familiar with the IBM's operating system will be familiar with these capabilities... First, note that in K2.00 (and up), 'ldefs -c' can be used to run OPCSDEFS commands inside OPCS, e.g. ldefs -c bigcounters on # big counters Which makes many of the below techniques unnecessary extra work. However, in the older releases (K1.xx) this is not available so the below techniques must be used. As with all DEFS file commands, you can execute motor definition commands from within the OPCS software by creating a small file, and the loading commands from it via LDEFS(OPCS)... In the following example, we switch back and forth between large and small counters: ! echo bigcounters on > tmpfile ! ldefs tmpfile # big counters ! echo bigcounters off > tmpfile ! ldefs tmpfile # small counters This 'trick' can be used with any OPCSDEFS commands, and uses the operating system's ECHO command and 'reroute output' symbol (>) to create the file FOO, which is then loaded as a file with the LDEFS command. This technique CAN be used within a script or when entering commands manually. You can create multiline files from within a script as shown in this example using MSDOS's > and >> (append) symbols: ! echo flog 2.0 > tmpfile ! echo logcounters yes >> tmpfile ldefs tmpfile This technique can be programmed into run scripts, so defs file information can be changed on the fly. Here is another way to enter DEFS commands directly to the LDEFS command from within the OPCS software: ldefs con # Load the special MSDOS file CON... logcounters no # which is really the keyboard (console) ppr a 400 # reading these commands from keyboard ^Z # CTRL-Z and RETURN ends this mode.. cam 12 # ..back to OPCS commands The 'ldefs con' technique works well for interactive typing, but cannot be programmed into a script, since it always reads from the keyboard. Use the 'echo' technique listed in the previous example for programming DEFS commands into a running script. These techniques are actually standard ways of using the DOS operating system, and are not particular to just the OPCS software.. they can be used by any program running under MSDOS that properly supports the operating system. Users not familiar with these techniques should learn them only if they think they might need them. At very least, operators should be aware of this capability. FILES \USR\BIN\OPCS.EXE - the OPCS system software executable OPCSDEFS.OPC - the 'start up' definition file *.DEF - other opcs definition files *.RUN - run scripts \USR\CATMAN\OPCS\* - online documentation pages SEE ALSO OPCS(DOCS) - the opcs system in general overview OPCSHARDWARE(DOCS) - hardware specifics (wiring, etc) OPCSIFACE(DOCS) - OPCS interface boards (A800, PIO-100, SD-800..) ORIGIN Gregory Ercolano, Los Feliz California 11/29/89