VELREP(OPCS) Optical Printer Control System VELREP(OPCS) NAME velrep - special purpose velocity repeat patterns for tandem shooting USAGE velrep [filename] [repcnt] 'filename' is the name of a '.vrp' file (format described below) that contains the commands to define the velocities necessary for tandem shooting. 'repcnt' is the number of times to loop the velocity patterns defined in the .vrp file. (e.g. the .VRP 'repeat' command) DESCRIPTION This command lets advanced users define very specific velocity patterns to send to the motors for precise tandem-motor shooting, such as shooting YCM B & W separation masters at full speed. Basically, any situation where shooting with separate cam and pro commands is too slow. The .vrp file defines which motors will be running. Normally this command is not executed directly by camera operators; typically a custom OPCS 'runcmd' command is defined to invoke velrep to implement shooting operations. This way, the runcmd programmer can hide the filename, which the camera operator shouldn't have to deal with. For instance, one might define a 'ycmshoot' command in the OPCSDEFS.OPC file as: runcmd ycm ycm.run 1 ..and creating a one-line 'ycm.run' file that contains: @velrep ycm.vrp $1 Then the operator can just type 'ycm 10', and this will actually invoke 'velrep ycm.vrp 10' behind the scenes. LIMITATIONS .VRP files minimally must contain the indicators "begin:" (at the top) and "done" (at the end), or undefined behavior will result. So to use the output of VELSAV(OPCS) in VELREP, you must add those indicators. In releases older than OPCS 2.24c, VELREP movement of non-shutter channels (D channel and up) did NOT adjust counters. This was fixed in OPCS 2.24c (and up, build date: 04-14-25) so that movement of non-shutter channels adjusts counters in steps. The 'if_finalrep_goto" has been implemented, but not tested. EXAMPLE velrep campro.vrp 5 # repeat the campro.vrp pattern 5 times THE .VRP FILE FORMAT -------------------- begin: # required label to indicate the first vels <label>: # optional labels for a block of vels 0 0 0 # vels, one for each channel (a, b, c..) -10 0 0 # '-' prefix indicates run in reverse 10+ 10+ 10+ # '+' postfix indicates increment/decrement the # frame counter by 1. Inc or dec depends on the # vel's direction; 10+ will inc, -10+ will dec. 0! 0 0 # '!' postfix (in 'a' chan ONLY) does 'allstop check' # (if true, jumps to <label> for 'allstop <label>') # 'allstop <label>' must be defined if ! specified. # Check is done AFTER these vels are sent to motors. goto <label> # where to go next when previous vels are sent repeat <label> # if repeating (velrep 2nd parameter), jumps to <label> allstop <label> # if allstop occurs, jumps to <label> to stop the motors # Only one 'allstop <label>' allowed in entire file. # '!' postfix indicates where to do allstop checks. tension +1 +1 -1 .. # Sets directions motors are primarily running, # either +1 (fwd), -1(rev), or 0 (still) for each chan. done # return to OPCS, shooting completed o Lines whose first character starts with a '#' are ignored. These are comment lines, and are not parsed by velrep. o Each line should have no more than 256 characters. o Always checks for BUCKLE and VIEWER as part of allstop checking. o "begin:" is required at the top o "done" is required at the end EXAMPLE VRP FILE ---------------- ## TEST.VRP - A simple run of projector only ## ## > An 811 pulse ramp up/dn ## > repeatable linear run that can be looped ## > 'allstop/buckle/viewer' can interrupt and resume cleanly ## ## These numbers came from running a 'pro' command where: ## ## ppr 5000 <-- 5000 pulses per rev ## spd b .35 .35 1 0 <-- .35 speed ## mrp 800 <-- MRP 800 ## ramp b 10 200 10 200 <-- (not used for shutter runs) ## ## ## To capture the vels, use 'velsav foo.pos', which can then be edited ## using VIM columnar copy/paste. Use: MOVOP FOO.POS v2p b 1 100 ## ..to convert vels to positions to check + graph moves with GR. ## # CHANGE TENSION MOTORS TO RUN FORWARD FOR CAM AND PRO tension 0 +1 0 begin: # RAMP UP: in 811 pulses # # AER PRO CAM # --- --- --- 0 1 0 # p=1 0 3 0 0 9 0 0 19 0 0 35 0 0 61 0 0 90 0 0 106 0 0 116 0 0 122 0 0 124 0 0 125 0 # p=811 goto linear_811 # Jump into middle of linear run allstop rampdown again: # Start of 10000 pulse linear frame loop 0 135 0 # p=4189 -- this would be start of rampdown 0 135 0 0 136 0 0 135 0 0 135 0 0 135 0 # p=5000 - would be end of rampdown # last 811 vels before loop 0 136 0 # p=0 -- this would be the rampup 0 135 0 0 135 0 0 135 0 0 135 0 0 135 0 # p=811 # Enter linear section from ramp up linear_811: 0 135 0 0 135 0 0 135 0 0 136 0 0 135 0 0 135 0 0 135 0 0 135 0 0 135 0 0 135 0 0 135 0 0 136 0 0 135 0 0 135 0 0 135 0 0 135 0 0 135 0 0 135 0 0 136+ 0 # <-- '+' SUFFIX: ADVANCE PRO COUNTER +1 0 135 0 0 135 0 0 135 0 0 135 0 0 135 0 0! 135 0 # p=4189 <-- ALLSTOP CHECK # This is where we jump to 'rampdown' # if allstop or buckle/viewer is tripped repeat again # Repeat loop: # Falls thru to "rampdown" on last frm of VRP repeat count rampdown: # Here's the 811 pulse rampdown to a stop. 0 125 0 # p=(4189+125) 0 124 0 0 122 0 0 116 0 0 106 0 0 90 0 0 61 0 0 35 0 0 19 0 0 9 0 0 3 0 0 1 0 # p=5000 (STOP) 0 0 0 # ** STOP ** 0 0 0 # <- HOLD for several samples (debugging) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 done ORIGIN Gregory Ercolano, Altadena, California 12/15/03