(saveFormat "2.0")
(date "Tue 19/Dec/1995 09:23:20 MST")
(veerev "3.2")
(platform "HP9000s700")
(SaveCF no)
(filterNAN 0)
(component 0 ROOTCONTEXT
 (name "Importing a Waveform File Example 1")
 (implementation
  (retainGlobals YES)
  (locked no)
  (trigMode deg)
  (nextID 8)
  (component 0 NOTE
   (name "Warranty Disclaimer")
   (implementation
	(text2 4
	  "This example is provided as an"
	  "illustration \"as is\", and Hewlett-Packard"
	  "Company makes no warranty of any kind"
	  "with regard to this example."
	)
   )
  )
  (component 1 FROMFILE
   (name "From File")
   (interface
	(output 1
	 (name "Name")
	 (lock constraints)
	 (optional yes)
	)
	(output 2
	 (name "Tstart")
	 (lock constraints)
	 (optional yes)
	)
	(output 3
	 (name "Tstop")
	 (lock constraints)
	 (optional yes)
	)
	(output 4
	 (name "Signal")
	 (lock constraints)
	 (optional yes)
	)
	(output 5
	 (name "Samples")
	 (lock constraints)
	 (optional yes)
	)
   )
   (implementation
	(transactions 6
	  "READ TEXT null TOKEN"
	  "READ TEXT Name TOKEN"
	  "READ TEXT Tstart REAL"
	  "READ TEXT Tstop REAL"
	  "READ TEXT Samples REAL"
	  "READ TEXT Signal REAL ARRAY:Samples"
	)
	(attr iopath file read "~installDir/examples/manual/manual30.dat"
	 (readTerm "\n")
	 (fs " ")
	 (eol "\n")
	 (multiField fullSyntax)
	 (arrayFormat block)
	)
   )
  )
  (component 2 TEXTDISPLAY
   (name "Signal Name")
   (interface
	(input 1
	 (name "Data")
	)
   )
   (implementation
   )
  )
  (component 3 TOWAVEFORM
   (interface
	(input 1
	 (name "Array")
	 (tag "Array")
	 (requires
	  (datatype Real)
	 )
	 (lock name constraints)
	)
	(input 2
	 (name "Time Span")
	 (tag "Time Span")
	 (requires
	  (datatype Real)
	  (shape "Scalar")
	 )
	 (lock constraints)
	 (optional yes)
	 (buffer YES)
	)
	(output 1
	 (name "Wf")
	 (tag "Wf")
	 (lock name constraints)
	)
   )
   (implementation
	(interval 0.001)
   )
  )
  (component 4 YPLOT
   (name "Waveform (Time)")
   (interface
	(input 1
	 (name "Trace")
	 (lock constraints)
	)
	(input 2
	 (type control)
	 (name "Auto Scale")
	 (lock name constraints)
	 (optional yes)
	)
   )
   (implementation
	(tracePin 1)
	(graphMode time)
   )
  )
  (component 5 FORMULA
   (interface
	(input 1
	 (name "A")
	 (optional yes)
	)
	(input 2
	 (name "B")
	 (optional yes)
	)
	(output 1
	 (name "Result")
	 (lock name constraints)
	)
   )
   (implementation
	(expr 1 "B-A")
   )
  )
  (component 6 CONTEXT
   (name "Press For")
   (implementation
	(locked no)
	(trigMode deg)
	(nextID 3)
	(component 0 IFTHENELSE
	 (name "!= 0")
	 (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")
	 )
	)
	(component 1 TOGGLE25
	 (name "Info About")
	 (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...")
	 (implementation
	  (locked no)
	  (trigMode deg)
	  (nextID 2)
	  (popupMoveable)
	  (component 0 CONFIRM25
	   (name "DONE")
	   (interface
		(output 1
		 (name "Go")
		 (lock name constraints)
		)
	   )
	   (implementation
		(component enterButton yes)
		(component escapeButton yes)
	   )
	  )
	  (component 1 NOTE
	   (name "Info About")
	   (implementation
		(text2 35
		  "Overview:"
		  "  This program illustrates how to import a data file created by another software "
		  "  package. In this case, the data file contains waveform data with a "
		  "  fixed-length file header."
		  ""
		  "Details:"
		  "  This program is very easy to understand if you examine the contents of the "
		  "  data file it reads (manual30.dat).  The file contains a text record of a "
		  "  sampled waveform.  Note that tags or markers such as NAME, START_TIME, and "
		  "  DATA mark the entries in the file header.  Further, note that this program "
		  "  assumes that the header is always the same length; the name, start time, "
		  "  etc. are always present and are always in the same order."
		  ""
		  "To run this program, simply press the \"Start\" button."
		  ""
		  "This is how the \"From File\" object works:"
		  ""
		  "  The first transaction strips off the NAME marker from the file."
		  ""
		  "  The second transaction reads the string containing the name of the waveform."
		  ""
		  "  The third transaction reads the time in seconds when the first sample of the"
		  "  waveform was recorded."
		  ""
		  "  The fourth transaction reads the time in seconds when the last sample of the"
		  "  waveform was recorded."
		  ""
		  "  The fifth transaction reads the number of samples (data points) in the "
		  "  sampled waveform.  This value must be included as an output terminal so that "
		  "  it can be accessed by the next transaction."
		  ""
		  "  The sixth transaction reads the sampled waveform data points.  The number of"
		  "  points reads is determined by the number of samples determined by the "
		  "  previous transaction."
		  ""
		)
	   )
	  )
	  (configuration
	  )
	  (ShowOnExecPanel
	   (geometry 5 36 853 548)
	   (panel
		(geometry 26 130 849 520)
		(widget 1 detail
		 (title off)
		 (borderStyle flat)
		 (geometry 30 135 837 460)
		 (editing disabled)
		)
		(widget 0 detail
		 (title off)
		 (borderStyle flat)
		 (geometry 415 605 70 36)
		)
	   )
	  )
	 )
	)
	(configuration
	 (connect D1:1 D0:1)
	 (connect D0:0 D1:1)
	 (connect D0:1 D2:0)
	)
   )
  )
  (component 7 START25
   (name "Start")
  )
  (configuration
   (connect D7:0 D1:0)
   (connect D1:1 D2:1)
   (connect D1:4 D3:1)
   (connect D5:1 D3:2)
   (connect D3:1 D4:1)
   (connect D3:0 D4:2)
   (connect D1:2 D5:1)
   (connect D1:3 D5:2)
  )
 )
 (viewFor -1
  (active detail)
  (detail
   (geometry 0 53 900 447)
   (configuration
	(viewFor 0
	 (active icon)
	 (icon
	  (geometry 371 76 338 48)
	  (iconImage "disclaim.icn")
	  (label off)
	 )
	 (detail
	  (geometry 382 129 397 82)
	  (editing disabled)
	 )
	)
	(viewFor 1
	 (active detail)
	 (icon
	  (geometry 245 228 110 25)
	 )
	 (detail
	  (geometry 59 282 363 157)
	 )
	 (terminals on)
	)
	(viewFor 2
	 (active detail)
	 (icon
	  (geometry 0 0 110 0)
	 )
	 (detail
	  (geometry 535 243 190 35)
	 )
	)
	(viewFor 3
	 (active icon)
	 (icon
	  (geometry 552 408 136 64)
	  (iconImage "build.icn")
	 )
	 (detail
	  (geometry 824 478 212 104)
	 )
	 (terminals on)
	)
	(viewFor 4
	 (active detail)
	 (icon
	  (iconImage "display.icn")
	 )
	 (detail
	  (geometry 616 526 409 248)
	  (displayMode scrollGraph)
	  (graphType cartesian)
	  (gridType axis)
	  (scale 0
	   (name "Mag")
	   (domainName "Time")
	   (pen 9)
	   (show 1)
	   (range -0.4 1 4 linear)
	  )
	  (domain 0 0.001 4 linear)
	  (trace 0 onScale 0
	   (name "Trace")
	   (pen 4)
	   (lineType 1)
	   (pointType 0)
	  )
	 )
	)
	(viewFor 5
	 (active icon)
	 (icon
	  (geometry 531 308 78 64)
	  (iconImage "formula.icn")
	 )
	 (detail
	  (geometry 541 268 79 104)
	 )
	 (terminals on)
	)
	(viewFor 6
	 (active panel)
	 (icon
	  (geometry 715 598 110 25)
	 )
	 (panel
	  (geometry 31 102 319 77)
	  (widget 1 detail
	   (title off)
	   (borderStyle flat)
	   (geometry 133 115 114 39)
	   (scaled on)
	   (format button)
	  )
	 )
	 (detail
	  (geometry 4 75 912 591)
	  (configuration
	   (viewFor 0
		(active icon)
		(icon
		 (geometry 327 308 46 25)
		)
		(detail
		 (geometry 209 308 73 64)
		)
		(terminals on)
	   )
	   (viewFor 1
		(active detail)
		(icon
		 (geometry -40 -7 81 15)
		)
		(detail
		 (geometry 163 301 114 39)
		 (scaled on)
		 (format button)
		)
		(title off)
	   )
	   (viewFor 2
		(active icon)
		(icon
		 (geometry 387 378 127 25)
		)
		(detail
		 (geometry 505 470 351 200)
		 (configuration
		  (viewFor 0
		   (active detail)
		   (icon
			(geometry -22 -7 45 15)
		   )
		   (detail
			(geometry 661 572 58 37)
		   )
		   (title off)
		  )
		  (viewFor 1
		   (active icon)
		   (icon
			(geometry 565 508 110 25)
		   )
		   (detail
			(geometry 299 514 543 213)
			(editing disabled)
		   )
		  )
		 )
		 (stackingOrder 1 0)
		)
	   )
	   (connect D1:1 D0:1
		(points 2 279 320 324 320)
	   )
	   (connect D0:0 D1:1
		(points 5 350 335 350 360 140 360 140 320 160 320)
	   )
	   (connect D0:1 D2:0
		(points 3 375 310 450 310 450 375)
	   )
	  )
	  (stackingOrder 0 1 2)
	 )
	)
	(viewFor 7
	 (active detail)
	 (icon
	  (geometry -21 -7 42 15)
	 )
	 (detail
	  (geometry 226 201 69 39)
	 )
	 (title off)
	)
	(connect D7:0 D1:0
	 (points 2 260 242 260 261)
	)
	(connect D1:1 D2:1
	 (points 4 494 300 510 300 510 260 532 260)
	)
	(connect D1:4 D3:1
	 (points 4 494 390 510 390 510 420 549 420)
	)
	(connect D5:1 D3:2
	 (points 6 611 340 630 340 630 390 530 390 530 460 549 460)
	)
	(connect D3:1 D4:1
	 (points 6 690 440 710 440 710 490 590 490 590 590 613 590)
	)
	(connect D3:0 D4:2
	 (points 5 620 474 620 480 580 480 580 710 613 710)
	)
	(connect D1:2 D5:1
	 (points 4 494 330 510 330 510 320 528 320)
	)
	(connect D1:3 D5:2
	 (points 2 494 360 528 360)
	)
   )
   (stackingOrder 0 6 7 2 4 1 3 5)
  )
  (titleBg "Gray")
  (titleFg "Black")
  (numberFormats
   (realFormat standard)
   (realSigDigits 4)
   (realRadixSpec 4)
   (integerBase decimal)
  )
 )
)
