(saveFormat "2.0")
(date "Tue 19/Dec/1995 09:23:37 MST")
(veerev "3.2")
(platform "HP9000s700")
(SaveCF no)
(filterNAN 0)
(component 0 ROOTCONTEXT
 (name "UserObject Source Code")
 (implementation
  (retainGlobals YES)
  (locked no)
  (trigMode rad)
  (nextID 9)
  (component 0 SLIDER
   (name "ampl")
   (interface
	(output 1
	 (name "Real")
	 (lock name constraints)
	)
   )
   (implementation
	(value Real
	 (values range 0 1)
	 (data  0.495)
	)
	(initValue Real
	 (data  0)
	)
	(detents 0.001)
   )
  )
  (component 1 VFUNCTIONGENERATOR
   (name "Function Generator")
   (interface
	(output 1
	 (name "Func")
	 (lock name constraints)
	)
   )
   (implementation
	(function Sine)
	(frequency 100)
	(amplitude 1)
	(dcOffset 0)
	(phaseShift 0)
	(numPoints 256)
	(interval 0.02)
	(degRad Rad)
	(errorOnAlias 1)
   )
  )
  (component 2 YPLOT
   (name "XY Trace")
   (interface
	(input 1
	 (name "Trace1")
	 (lock constraints)
	)
   )
   (implementation
	(tracePin 1)
	(graphMode rectangular)
   )
  )
  (component 3 CONTEXT
   (name "noiseUF")
   (interface
	(input 1
	 (name "Amplitude")
	 (requires
	  (datatype Real)
	  (shape "Scalar")
	 )
	 (optional yes)
	)
	(input 2
	 (name "Y")
	 (optional yes)
	)
	(output 1
	 (type data)
	 (name "Y+Noise")
	 (lock constraints)
	 (optional yes)
	)
   )
   (implementation
	(locked no)
	(trigMode deg)
	(nextID 2)
	(component 0 VNOISEGENERATOR
	 (interface
	  (input 1
	   (name "Amplitude")
	   (tag "Amplitude")
	   (requires
		(datatype Real)
		(shape "Scalar")
	   )
	   (lock constraints)
	   (optional yes)
	   (buffer YES)
	  )
	  (output 1
	   (name "noise WF")
	   (tag "noiseWF")
	   (lock name constraints)
	  )
	 )
	 (implementation
	  (amplitude 0.495)
	  (numPoints 256)
	  (interval 0.02)
	 )
	)
	(component 1 FORMULA
	 (name " + ")
	 (interface
	  (input 1
	   (name "X")
	   (optional yes)
	  )
	  (input 2
	   (name "Y")
	   (optional yes)
	  )
	  (output 1
	   (name "Result")
	   (lock name constraints)
	  )
	 )
	 (implementation
	  (expr 1 "X+Y")
	 )
	)
	(configuration
	 (connect I1:1 D0:1)
	 (connect D0:1 D1:1)
	 (connect I2:1 D1:2)
	 (connect D1:1 O1:1)
	)
   )
  )
  (component 6 CONTEXT
   (name "Press For")
   (description2 10
	"This User Object is the outermost \"context\""
	"for the InfoAbout help device.  Within this"
	"device is the pop-up panel containing the info"
	"Notepad.  If all you can see is a device with"
	"\"Press For\", you should double-click the left"
	"mouse button on the Press For to restore the"
	"Panel View of the device.  To see how this device"
	"operates, click on the Info About button first,"
	"then press the Detail button in the \"Press For\""
	"title bar."
   )
   (implementation
	(locked no)
	(trigMode deg)
	(nextID 4)
	(component 0 TOGGLE25
	 (name "Info About")
	 (description2 17
	  "This is a toggle device with the name changed to"
	  "reflect it\'s function.  The output of the device"
	  "is \"0\" when the button is up, and \"1\" when the"
	  "button is down.  "
	  ""
	  "A Reset Control Input terminal has been added to"
	  "to always pop the button back out after showing"
	  "the pop-up help (Info About This Example) User"
	  "Object."
	  ""
	  "The Toggle has set the \"AutoExecute\" option to let"
	  "it operate even when the RUN button in the title"
	  "bar has not been pressed.  Note, however, that"
	  "AutoExecute only works when no other threads are"
	  "operating, either from their Start buttons or from"
	  "the RUN button."
	  ""
	 )
	 (interface
	  (input 1
	   (type control)
	   (name "Reset")
	   (lock name constraints)
	   (optional yes)
	  )
	  (output 1
	   (lock name constraints)
	  )
	 )
	 (implementation
	  (value Int32
	   (data  0)
	  )
	  (autoTrigger on)
	  (initValue Int32
	   (data  0)
	  )
	 )
	)
	(component 2 CONTEXT
	 (name "Info About This Example")
	 (description2 10
	  "This is a User Object that has both a detail view"
	  "and a Panel view.  If this device is visible as"
	  "an icon, you must double-click the left mouse"
	  "button to \"open up\" the non-iconic view."
	  ""
	  "Since the User Object has both a Panel and Detail"
	  "view, when you double-click on the icon, you will"
	  "first see the Panel view.  To see the components"
	  "of the User Object, press the Detail button in"
	  "the \"Info About This Example\" title bar."
	 )
	 (implementation
	  (locked no)
	  (trigMode deg)
	  (nextID 2)
	  (popupMoveable)
	  (component 0 NOTE
	   (name "NotePad")
	   (description2 11
		"This notepad is displayed as a Show on Execute"
		"panel to present the information to the reader."
		""
		"It has been \"Added to Panel\" of the \"Info About"
		"This Example\" user object, thus it is not "
		"necessary to keep it as an open device inside the"
		"Detail view; you can edit the notepad from the"
		"Panel view of this User Object.  You can also"
		"set/clear the \"Enable Edit\" flag in this Notepad\'s"
		"Object Menu to keep the pop-up notepad from being"
		"altered by the user."
	   )
	   (implementation
		(text2 60
		  "PURPOSE: Provides the source code for an example containing a UserObject "
		  "    to be made into a User Function.  This Info About describes the "
		  "    process which is used to make a User Function."
		  ""
		  "USER INPUT REQUIRED:  To see the program run as a UserObject, press \"Run\".  "
		  "    Follow the instructions under EXPLANATION to convert it to a User "
		  "    Function."
		  ""
		  "EXPLANATION:"
		  "\tA User Function is a user-defined function created from a UserObject "
		  "    by executing Make UserFunction from the object menu.  The User Function"
		  "    exists in the background within the HP VEE process, but provides the same "
		  "    functionality as the original UserObject.  You can call a User Function"
		  "    with the Call Function object, or from certain expressions.  The major"
		  "    advantage of creating a User Function is that you can call the same "
		  "    User Function several times in your program.  Thus, there is only one "
		  "    User Function to edit and maintain, rather than several instances of a"
		  "    UserObject."
		  "\t"
		  "\tThe first step in creating any User Function is to create a UserObject."
		  "    This example already contains a UserObject that adds a noise component"
		  "    to the waveform on its Y input, and then outputs the modified waveform"
		  "    on its Y+Noise output terminal.  Note that the amplitude of the noise"
		  "    component is controlled by the Real Slider connected to the Amplitude"
		  "    input of the UserObject."
		  ""
		  "\tNote that the UserObject is named noiseUF.  When you convert the"
		  "    UserObject into a User Function, the name in the title field will become"
		  "    the name of the User Function. You can then call the User Function by"
		  "    including this function name in a Call Function object, or in certain"
		  "    expressions.  If the name in the title field conflicts with any existing"
		  "    User Function, you will be prompted for a different name when you execute"
		  "    Make UserFunction."
		  ""
		  "\tTo convert the UserObject into a User Function, execute Make User "
		  "    Function from the UserObject\'s object menu.  The UserObject will "
		  "    disappear, being replaced by a Call Function object with the same input"
		  "    and output terminals.  The UserObject is now converted into a User "
		  "    Function, named noiseUF, which exists in the \"background\""
		  "\tof the VEE process, but which contains the same functionality as the "
		  "    original UserObject.  When you run the program containing the User "
		  "    Function (called with Call Function), the result is the same as for the"
		  "    original program with the UserObject. (Try it.)"
		  ""
		  "\tIf you wish to edit the User Function, select Edit UserFunction from "
		  "    the Edit menu. The Edit UserFunction dialog box appears, listing the "
		  "    available User Functions that you can edit.  Select noiseUF and a work"
		  "    area with the User Function will appear.  You can edit the User Function"
		  "    in the work area just as you would the original UserObject, except that"
		  "    you can\'t connect to any objects outside the User Function. Click on "
		  "    Done when you have finished editing."
		  ""
		  "\tIf you want to reconvert the User Function back into a UserObject, "
		  "    just select Make UserObject from the object menu of the dialog box.  If "
		  "    you do, the Call Function object will remain, but the User Function will"
		  "    be converted back into a UserObject. The Call Function object will error"
		  "    if you try to run without providing another User Function of that name."
		  ""
		  "\tSee Chapter 11 of the \"Using VEE-Engine and VEE-Test\" manual for "
		  "    additional editing which you can do to this program."
		)
	   )
	  )
	  (component 1 CONFIRM25
	   (name "DONE")
	   (description2 7
		"This tiny \"thread\" begins running when the "
		"enclosing UserObject is executed.  When the user"
		"acknowledges the OK/DONE button, there is nothing"
		"left to execute, so the thread ends.  Since there"
		"are not other threads running, the User Object"
		"is completed and will exit, removing the Show on"
		"Execute pop-up display."
	   )
	   (interface
		(output 1
		 (name "Go")
		 (lock name constraints)
		)
	   )
	   (implementation
		(component enterButton yes)
		(component escapeButton yes)
	   )
	  )
	  (configuration
	  )
	  (ShowOnExecPanel
	   (geometry 4 32 833 542)
	   (panel
		(geometry 36 120 829 521)
		(widget 0 detail
		 (title off)
		 (borderStyle flat)
		 (geometry 42 126 816 465)
		 (editing disabled)
		)
		(widget 1 detail
		 (title off)
		 (borderStyle flat)
		 (geometry 415 599 67 33)
		)
	   )
	  )
	 )
	)
	(component 3 IFTHENELSE
	 (name "!= 0")
	 (description2 5
	  "If no threads are running, the Toggle can generate"
	  "it\'s output data whenever the button is changed"
	  "(using the Toggle\'s AutoExecute mode).  In this"
	  "case, either the User Object is executed or the"
	  "Autoexecute sequence terminates."
	 )
	 (interface
	  (input 1
	   (name "A")
	   (optional yes)
	  )
	  (output 1
	   (name "Then")
	   (lock name constraints)
	  )
	  (output 2
	   (name "Else")
	   (lock name constraints)
	  )
	 )
	 (implementation
	  (expr "a!=0")
	 )
	)
	(configuration
	 (connect D1:0 D0:1)
	 (connect D2:1 D1:0)
	 (connect D0:1 D2:1)
	)
   )
  )
  (component 7 NOTE
   (implementation
   )
  )
  (configuration
   (connect D3:1 D2:1)
   (connect D0:1 D3:1)
   (connect D1:1 D3:2)
  )
 )
 (viewFor -1
  (active detail)
  (detail
   (geometry 0 53 900 447)
   (configuration
	(viewFor 0
	 (active detail)
	 (icon
	  (geometry 0 0 46 0)
	 )
	 (detail
	  (geometry 25 105 110 150)
	  (layout vertical)
	  (fastmode off)
	 )
	)
	(viewFor 1
	 (active detail)
	 (icon
	  (geometry 95 438 148 64)
	  (iconImage "virtual.icn")
	 )
	 (detail
	  (geometry 55 372 201 196)
	 )
	 (terminals on)
	)
	(viewFor 2
	 (active detail)
	 (icon
	  (iconImage "display.icn")
	 )
	 (detail
	  (geometry 473 375 255 211)
	  (displayMode scrollGraph)
	  (graphType cartesian)
	  (gridType off)
	  (scale 0
	   (name "Y name")
	   (domainName "X name")
	   (pen 3)
	   (show 1)
	   (range -1.5 1.5 4 linear)
	  )
	  (domain 0 0.02 4 linear)
	  (trace 0 onScale 0
	   (name "Trace1")
	   (pen 4)
	   (lineType 1)
	   (pointType 0)
	  )
	 )
	)
	(viewFor 3
	 (active detail)
	 (icon
	  (geometry 350 526 80 28)
	 )
	 (detail
	  (geometry 260 104 371 193)
	  (configuration
	   (viewFor 0
		(active detail)
		(icon
		 (iconImage "virtual.icn")
		)
		(detail
		 (geometry 375 147 140 86)
		)
		(terminals on)
	   )
	   (viewFor 1
		(active icon)
		(icon
		 (geometry 557 258 46 25)
		)
		(detail
		)
		(terminals on)
	   )
	   (connect I1:1 D0:1
		(points 4 260 150 270 150 270 190 292 190)
	   )
	   (connect D0:1 D1:1
		(points 6 587 190 610 190 610 250 540 250 540 260 554 260)
	   )
	   (connect I2:1 D1:2
		(points 4 260 250 270 250 270 280 554 280)
	   )
	   (connect D1:1 O1:1
		(points 4 605 270 620 270 620 200 630 200)
	   )
	  )
	  (stackingOrder 0 1)
	 )
	 (terminals on)
	)
	(viewFor 6
	 (active panel)
	 (icon
	  (geometry 965 -42 110 25)
	 )
	 (panel
	  (geometry 31 612 319 77)
	  (widget 0 detail
	   (title off)
	   (borderStyle flat)
	   (geometry 134 630 114 39)
	   (scaled on)
	   (format button)
	  )
	 )
	 (detail
	  (geometry 4 75 912 591)
	  (configuration
	   (viewFor 0
		(active detail)
		(icon
		 (geometry -40 -7 81 15)
		)
		(detail
		 (geometry 203 301 114 39)
		 (scaled on)
		 (format button)
		)
		(title off)
	   )
	   (viewFor 2
		(active icon)
		(icon
		 (geometry 342 368 217 25)
		)
		(detail
		 (geometry 37 150 866 520)
		 (configuration
		  (viewFor 0
		   (active detail)
		   (icon
			(geometry 440 416 78 25)
		   )
		   (detail
			(geometry 46 202 848 437)
			(editing enabled)
		   )
		  )
		  (viewFor 1
		   (active detail)
		   (icon
			(geometry -22 -7 45 15)
		   )
		   (detail
			(geometry 441 472 58 37)
		   )
		   (title off)
		  )
		 )
		 (stackingOrder 1 0)
		)
	   )
	   (viewFor 3
		(active icon)
		(icon
		 (geometry 377 308 46 25)
		)
		(detail
		 (geometry 349 328 73 64)
		)
		(terminals on)
	   )
	   (connect D1:0 D0:1
		(points 5 450 395 450 410 180 410 180 320 200 320)
	   )
	   (connect D2:1 D1:0
		(points 3 425 310 450 310 450 365)
	   )
	   (connect D0:1 D2:1
		(points 2 319 320 374 320)
	   )
	  )
	  (stackingOrder 0 2 1)
	 )
	)
	(viewFor 7
	 (active icon)
	 (icon
	  (geometry 391 646 338 48)
	  (iconImage "disclaim.icn")
	  (label off)
	 )
	 (detail
	  (geometry 830 250 200 100)
	  (editing enabled)
	 )
	)
	(connect D3:1 D2:1
	 (points 6 693 200 710 200 710 320 450 320 450 480 470 480)
	)
	(connect D0:1 D3:1
	 (points 4 137 180 160 180 160 150 177 150)
	)
	(connect D1:1 D3:2
	 (points 6 298 470 320 470 320 330 160 330 160 250 177 250)
	)
   )
   (stackingOrder 3 5 4 0 1 2)
  )
  (titleBg "Gray")
  (titleFg "Black")
  (numberFormats
   (realFormat standard)
   (realSigDigits 4)
   (realRadixSpec 4)
   (integerBase decimal)
  )
 )
)
