(saveFormat "2.3")
(date "Mon 03/Mar/1997 16:47:43 MST")
(veerev "4.0")
(platform "HP9000s700")
(execMode fast)
(filterNAN 0)
(workspaceStackingOrder M)
(SaveCF no)
(device 0 ROOTCONTEXT
(properties
(trigMode rad)
(nextID 14)
(popupTitleText "Multiple User Function Calls")
(popupMoveable 1)
(popupTitleTextColor "Black")
(popupTitleBackgroundColor "Gray")
(deleteGlobals 0))
(deviceList
(UserFunctions
(nextID 1)
(context 0
(properties
(name "noiseUF")
(trigMode deg)
(nextID 3))
(interface
(input 1
(name "Y")
(optional yes))
(output 1
(type data)
(name "Y+Noise")
(lock constraints)
(optional yes)))
(deviceList
(device 0 VNOISEGENERATOR
(properties
(amplitude 0.281)
(numPoints 256)
(interval 0.02))
(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))))
(device 1 FORMULA
(properties
(name " + ")
(expr 1 "X+Y"))
(interface
(input 1
(name "X")
(optional yes))
(input 2
(name "Y")
(optional yes))
(output 1
(name "Result")
(tag "Result")
(lock name constraints)
(optional yes))))
(device 2 FROMGLOBAL
(properties
(globalName "ampl"))
(interface
(output 1
(name "Data")
(tag "Data")
(lock name constraints))))
(configuration
(connect D2:1 D0:1)
(connect D0:1 D1:1)
(connect I1:1 D1:2)
(connect D1:1 O1:1)))
(contextCarrier
(active detail)
(detail
(extent 453 303)
(anchorPt 199 205)
(configuration
(devCarrierFor 0
(active open)
(icon
(iconImage "virtual.icn"))
(open
(extent 140 86))
(terminals on)
(pinCenter 0 0))
(devCarrierFor 1
(active icon)
(icon
(extent 46 25))
(open)
(terminals on)
(pinCenter 205 70))
(devCarrierFor 2
(active open)
(icon)
(open
(extent 89 62))
(terminals on)
(pinCenter -115 -140))
(connect D2:1 D0:1
(points 6 -28 -140 5 -140 5 -100 -175 -100 -175 0 -143 0))
(connect D0:1 D1:1
(points 6 142 0 175 0 175 40 165 40 165 60 179 60))
(connect I1:1 D1:2
(points 4 -199 -58 -185 -58 -185 80 179 80))
(connect D1:1 O1:1
(points 4 230 70 245 70 245 -58 253 -58)))
(stackingOrder 0 2 1)))))
(device 0 SLIDER
(properties
(name "ampl")
(range 0 1)
(detents 0.001))
(interface
(output 1
(name "Real")
(lock name constraints)))
(implementation
(value Real
(data  0.281))
(initValue Real
(data  0))))
(device 1 YPLOT
(properties
(name "XY Trace"))
(interface
(input 1
(name "Trace1")
(lock constraints)))
(implementation
(tracePin 1)
(graphMode rectangular)))
(device 2 CALL
(properties
(name "Call Function")
(callFunc "noiseUF")
(parmMode rev2x_22rules))
(interface
(input 1
(name "Y")
(optional yes))
(output 1
(name "Y+Noise")
(lock name constraints)
(optional yes))))
(device 3 TOGLOBAL
(properties
(globalName "ampl"))
(interface
(input 1
(name "Data")
(tag "Data"))))
(device 4 FORMULA
(properties
(expr 1 "abs(noiseUF(Y))"))
(interface
(input 1
(name "Y")
(optional yes))
(output 1
(name "Result")
(tag "Result")
(lock name constraints)
(optional yes))))
(device 5 YPLOT
(properties
(name "XY Trace"))
(interface
(input 1
(name "Trace1")
(lock constraints)))
(implementation
(tracePin 1)
(graphMode rectangular)))
(device 6 YPLOT
(properties
(name "XY Trace"))
(interface
(input 1
(name "Trace1")
(lock constraints)))
(implementation
(tracePin 1)
(graphMode rectangular)))
(device 7 VFUNCTIONGENERATOR
(properties
(function Sine)
(frequency 100)
(amplitude 1)
(dcOffset 0)
(degRad Rad)
(phaseShift 0)
(interval 0.02)
(numPoints 256))
(interface
(output 1
(name "Func")
(lock name constraints))))
(device 8 FORMULA
(properties
(expr 1 "abs(noiseUF(Y))-1.5"))
(interface
(input 1
(name "Y")
(optional yes))
(output 1
(name "Result")
(tag "Result")
(lock name constraints)
(optional yes))))
(device 11 CONTEXT
(properties
(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.")
(trigMode deg)
(nextID 4))
(deviceList
(device 0 TOGGLE25
(properties
(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." "")
(autoTrigger 1))
(interface
(input 1
(type control)
(name "Reset")
(lock name constraints)
(optional yes))
(output 1
(lock name constraints)))
(implementation
(value Int32
(data  0))
(initValue Int32
(data  0))))
(device 2 CONTEXT
(properties
(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.")
(trigMode deg)
(nextID 2)
(popupMoveable 1))
(deviceList
(device 0 NOTE
(properties
(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.")
(text2 17
"PURPOSE: Illustrates multiple calls to a UserFunction, using the Call "
"    Function object as well as expressions calling the User Function by name."
"" "USER INPUT REQUIRED:  Press \"Run\"." "" "EXPLANATION:"
"\tA User Function can be called by either a Call Function object or from "
"    any expression evaluated at run time.  This example shows a Call "
"    Function object and two Formula objects that call a UserFunction.  The "
"    Call Function object calls the User Function noiseUF and returns a sine "
"    wave with an added noise component.  The expression abs(noiseUF(Y)) in "
"    the first Formula object returns the absolute value of the waveform "
"    returned by the UserFunction noiseUF.  Thus, the displayed noisy sine "
"    wave is \"rectified\" in the positive direction.  The expression "
"    abs(noiseUF(Y))-1.5 in the second Formula object does the same, but also "
"    adds a negative \"dc offset\" to the waveform.  Note that the sequence pins"
"\tare used to ensure correct propagation with the global variable.")))
(device 1 CONFIRM25
(properties
(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))
(configuration)
(ShowOnExecPanel
(relativeOrigin 4 32)))
(contextCarrier
(active detail)
(panel
(extent 805 442)
(widget 0 detail
(relativeOrigin 4 3)
(title off)
(borderStyle flat)
(extent 788 385)
(editing disabled))
(widget 1 detail
(relativeOrigin 364 395)
(title off)
(borderStyle flat)
(extent 68 35)))
(detail
(extent 866 520)
(anchorPt 433 270)
(configuration
(devCarrierFor 0
(active open)
(icon
(extent 78 25))
(open
(extent 848 437)
(editing enabled))
(pinCenter 0 0))
(devCarrierFor 1
(active open)
(icon
(extent 45 15))
(open
(extent 58 37))
(title off)
(pinCenter 0 70)))
(stackingOrder 1 0))))
(device 3 IFTHENELSE
(properties
(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.")
(cases 1 "a!=0"))
(interface
(input 1
(name "A")
(optional yes))
(output 1
(name "Then")
(lock name constraints))
(output 2
(name "Else")
(lock name constraints))))
(configuration
(connect D1:0 D0:1)
(connect D2:1 D1:0)
(connect D0:1 D2:1)))
(contextCarrier
(active panel)
(panel
(extent 305 76)
(widget 0 detail
(relativeOrigin 101 16)
(title off)
(borderStyle flat)
(extent 114 39)
(scaled on)
(format button)))
(detail
(extent 912 591)
(anchorPt 256 245)
(configuration
(devCarrierFor 0
(active open)
(icon
(extent 81 15))
(open
(extent 114 39)
(scaled on)
(format button))
(title off)
(pinCenter 0 0))
(devCarrierFor 2
(active icon)
(icon
(extent 217 25))
(open
(extent 805 442)
(carbonCopy))
(bg "Light Blue Gray")
(pinCenter 220 40))
(devCarrierFor 3
(active icon)
(icon
(extent 46 25))
(open
(extent 73 64))
(terminals on)
(pinCenter 140 0))
(connect D1:0 D0:1
(points 5 220 55 220 70 -80 70 -80 0 -60 0))
(connect D2:1 D1:0
(points 3 165 -10 220 -10 220 25))
(connect D0:1 D2:1
(points 2 59 0 114 0)))
(stackingOrder 0 2 1))))
(device 12 NOTE)
(configuration
(connect D2:1 D1:1)
(connect D3:0 D2:0)
(connect D7:1 D2:1)
(connect D0:1 D3:1)
(connect D2:0 D4:0)
(connect D7:1 D4:1)
(connect D4:1 D5:1)
(connect D8:1 D6:1)
(connect D4:0 D8:0)
(connect D7:1 D8:1)))
(contextCarrier
(wndOrigin 2 2)
(wndState res)
(active detail)
(detail
(extent 937 513)
(anchorPt 120 136)
(configuration
(devCarrierFor 0
(active open)
(icon
(extent 46 0))
(open
(extent 110 150)
(layout vertical)
(fastmode off))
(pinCenter 0 0))
(devCarrierFor 1
(active open)
(icon
(iconImage "display.icn"))
(open
(extent 153 124)
(displayMode graphOnly)
(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)))
(pinCenter 560 100))
(devCarrierFor 2
(active open)
(icon)
(open
(extent 199 77))
(terminals on)
(pinCenter 275 140))
(devCarrierFor 3
(active open)
(icon)
(open
(extent 89 62))
(terminals on)
(pinCenter 295 0))
(devCarrierFor 4
(active open)
(icon
(iconImage "formula.icn"))
(open
(extent 157 55))
(terminals on)
(pinCenter 280 270))
(devCarrierFor 5
(active open)
(icon
(iconImage "display.icn"))
(open
(extent 153 124)
(displayMode graphOnly)
(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)))
(pinCenter 560 270))
(devCarrierFor 6
(active open)
(icon
(iconImage "display.icn"))
(open
(extent 153 124)
(displayMode graphOnly)
(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)))
(pinCenter 560 440))
(devCarrierFor 7
(active icon)
(icon
(extent 177 78)
(iconImage "virtual.icn"))
(open
(extent 201 196))
(terminals on)
(pinCenter 10 270))
(devCarrierFor 8
(active open)
(icon
(iconImage "formula.icn"))
(open
(extent 187 55))
(terminals on)
(pinCenter 280 390))
(devCarrierFor 11
(active open)
(icon
(extent 110 25))
(open
(extent 319 77)
(carbonCopy))
(bg "Light Blue Gray")
(pinCenter 570 -40))
(devCarrierFor 12
(active icon)
(icon
(extent 338 48)
(iconImage "disclaim.icn")
(label off))
(open
(extent 200 100)
(editing enabled))
(pinCenter 80 500))
(connect D2:1 D1:1
(points 4 437 140 460 140 460 100 481 100))
(connect D3:0 D2:0
(points 2 290 33 290 81))
(connect D7:1 D2:1
(points 4 101 270 120 270 120 140 143 140))
(connect D0:1 D3:1
(points 2 57 0 208 0))
(connect D2:0 D4:0
(points 2 290 181 290 222))
(connect D7:1 D4:1
(points 2 101 270 169 270))
(connect D4:1 D5:1
(points 2 411 270 481 270))
(connect D8:1 D6:1
(points 4 426 390 450 390 450 440 481 440))
(connect D4:0 D8:0
(points 2 290 300 290 342))
(connect D7:1 D8:1
(points 4 101 270 120 270 120 390 154 390)))
(stackingOrder 5 10 6 1 0 2 4 8 3 7 9))
(numberFormats
(realFormat standard)
(realSigDigits 4)
(realRadixSpec 4)
(integerBase decimal))))
