SYNTAX(DOCS)		Optical Printer Control System		SYNTAX(DOCS)

    NAME
        syntax - general syntax of opcs commands

    A Description Of OPCS Command Syntax

	Many commands can appear on one line, and a line can be up to 128
	characters (or can wrap around the screen about one and a half times).
	Commands and arguments are always separated by 'white space'
	(spaces or tabs).

	Commands that have a FIXED number of arguments (such as RAT and RES),
	all arguments should be separated by white space.

	Where appropriate, '>' can be used as a prefix to specify an absolute
	position in the contex of frames to shoot, or motor positions to go to.

	Some commands expect frame specifications, which can be expressed in
	many different ways. Such a command is the 'CAM' command, and here are
	some valid frame specifications:

		cam 12			# run camera 12 frames
		cam -5			# run camera 5 frames in reverse
		cam 12'2		# run camera 12 feet 2 frames
		cam -15'0		# run camera in reverse 15 feet
		cam >34			# send camera to frame 34
		cam >-34		# send camera to frame -34
		cam >-12'3		# send camera to negative 12 ft 3 frms
		cam (3+12*12)		# run camera 147 frames
		cam (3+(3*sqrt(16)*12))	# same as above


    MATH EXPRESSIONS	
	You can usually use math expressions in place of most numeric 
	arguments as long as the expression is ENCLOSED IN PARENTHESIS,
	and DOES NOT CONTAIN EMBEDDED SPACES. Example:

	    (3+(3*sqrt(16)*12))

	Math can be done on frame counter values:

	    (cam+3)

	For a complete list of all built in math operations, execute:

	     (?)

	The following lists some of the operations supported by the 
	math expression parser:

		/*** TYPICAL OPERATIONS ***/

		3+4-2*12/6         # add, subtract, multiply, divide
		533%256            # modulus
		2^4                # exponentiation (powers)

		/*** OPCS VALUES ***/
		cam   - camera counter value
		pro   - main projector counter value
		pro1  - main projector counter value 
		pro2  - aerial projector counter value

		/*** MATH FUNCTIONS ***/

		sqrt(),  log(),     exp(),
		sin(),   cos(),     tan(),
		asin(),  acos(),    atan(),
		atan2(), radians(), degrees()
		hex(), pi

		/*** NUMERIC EXPRESSIONS ***/
		-12           # negative 12
		+34           # positive 34
		0x3ff         # hex representation for 1023 decimal


    DIFFFERENT APPROACHES YIELD SIMILAR RESULTS
        With few exceptions, there are usually two ways to do anything in 
	the OPCS software. The following examples show two possible ways to 
	do step printing:

	do 12 cam 1 pro 2	# take 1 frame of every second projector frame
	
	rat 2 1 rep 12	# same as above
	
	The following two examples show how to automate the wedging process:
	
	do 200 cam 2 pse	# shoots 2 frames with a keyboard pause inbetween
	
	cam 2		# hitting the F4 key each time will shoot 2 frames
				# doing more or less the same as the above
	
    COMMAND LINE EDITING KEYS
	OPCS supports all of DOS's editing keys, such as F3 (retype a line but
	do not execute), LEFT and RIGHT ARROW keys for revealing characters 
	from the last line typed, INSERT and DELETE keys, etc. Refer to your 
	DOS manual for more on these editing keys and their use.

	In addition to the standard DOS editing keys, the F4 key is programmed
	by the OPCS software to RE-EXECUTE the last line typed with one 
	key press. This is useful for doing wedges, or situations where
	manual stopping/starting is necessary.

    SHELL EXECUTION
	Part of the system philosophy is to allow the user to execute their
	own programs via operating system calls to run their program like
	any other DOS program. You can execute shell commands by prefixing
	the command with a 'bang' (!). Thus:

		!  dir *.run  |  more

	You can also use (!) to QUOTE a dos command, so that OPCS commands
	can be mixed with the dos commands:

		cam 12 ! echo Shot 12 frames !  pro 12 ! echo DONE
		         -------------------             ---------
	The underlined commands are executed as DOS commands, the rest
	are executed as OPCS commands. Note how the ! turns DOS execution
	on and off throughout the line. Also note that a closing ! is
	not necessary at the end of the line.

	This (!) technique is patterned after a similar technique used
	by programs that run under the UNIX operating system.

    ORIGIN
	Gregory Ercolano, Los Feliz California 12/15/89
© Copyright 1997 Greg Ercolano. All rights reserved.