#! /usr/lib/veetest/veetest -r
(revision "A.00.01")
(date "Wed 01/Jan/1992")
(component 0 "Context"
 (implementation
  (component 0 "Context"
   (name "Pass/Fail Chart")
   (description 30 4
    Generates and displays a Pass/Fail bar chart from
    the 1-D input data array and a Limit.  The number
    of bars is equal to the number of array elements,
    the "length" of each bar is set by the value of
    each element (which may be a positive or negative
    real or int32 number), and the color of each bar
    is determined by comparing to the limit threshold
    value.  
    
    The display is autoscaled after plotting the bars
    using the maximum and minumum array data values
    and the number of bars.
    
    The display and data labels, bar color, grid type,
    etc. can be set by clicking the Right Button over
    the display area and selecting the "Traces and
    Scales" entry from the resulting menu.  Changing
    the "sense" of the test is done by swapping the
    data Labels (PASS and FAIL) and the trace colors
    (Pen2 Pen3).  The gap between bars can be set
    using the "Spacing" box in the Bar Chart Detail
    view.
    
    It may prove useful to Secure the BarChart User
    Object after customizing, since this eliminates
    the Panel/Detail buttons and some menu selections
    that are no longer needed.  Be sure to save the
    unsecured object so you can make changes at a
    later date, however. 
    
   )
   (interface
    (sequence in)
    (sequence out)
    (input 1
     (type data)
     (name "Ary")
     (optional yes)
    )
    (input 2
     (type data)
     (name "B")
     (optional yes)
    )
   )
   (implementation
    (trigMode deg)
    (locked no)
    (component 0 "YPlot"
     (name "XY Trace")
     (subType "XY_Trace")
     (interface
      (sequence in)
      (sequence out)
      (input 1
       (type data)
       (name "PASS")
       (lock constraints)
      )
      (input 2
       (type data)
       (name "FAIL")
       (lock constraints)
       (optional yes)
      )
      (input 3
       (type data)
       (name "Limit")
       (lock constraints)
       (optional yes)
      )
      (input 4
       (type control)
       (name "Auto Scale")
       (lock name constraints)
       (optional yes)
      )
      (input 5
       (type control)
       (name "Next Curve")
       (lock name constraints)
       (optional yes)
      )
     )
     (implementation
      (component clearAtPrerun 1)
      (component clearAtActivate 0)
      (component tracePin 1)
      (component tracePin 2)
      (component tracePin 3)
      (component graphMode rectangular)
     )
     (views
      (icon
       (iconImage "display.icon")
      )
      (detail
       (origin 453 415)
       (extent 315 250)
       (displayMode annotGraph)
       (graphType cartesian)
       (gridType frame)
       (scale 0
        (name "Y name")
        (domainName "X name")
        (pen 9)
        (show 1)
        (range 0 10 4 linear)
       )
       (domain 0 10 4 linear)
       (trace 0 onScale 0
        (name "PASS")
        (pen 3)
        (lineType 1)
        (pointType 6)
       )
       (trace 1 onScale 0
        (name "FAIL")
        (pen 2)
        (lineType 1)
        (pointType 6)
       )
       (trace 2 onScale 0
        (name "Limit")
        (pen 4)
        (lineType 4)
        (pointType 0)
       )
      )
      (active detail)
     )
    )
    (component 1 "Formula"
     (name "Calculate FAIL Bar coords")
     (interface
      (sequence in)
      (sequence out)
      (input 1
       (type data)
       (name "A")
       (optional yes)
      )
      (input 2
       (type data)
       (name "I")
       (optional yes)
      )
      (input 3
       (type data)
       (name "L")
       (optional yes)
      )
      (input 4
       (type data)
       (name "z")
       (optional yes)
      )
      (output 1
       (type data)
       (name "Result")
       (lock name constraints)
      )
     )
     (implementation
      (component isLocked no)
      (component expr 1 "(a[i]<L ? [coord(I+z/2,A[i]) coord(I+1-z/2,A[i])] : [coord(I+z/2,0)])")
     )
     (views
      (icon
       (origin 193 468)
       (extent 235 45)
      )
      (detail
       (origin 113 458)
       (extent 664 204)
      )
      (terminals on)
      (active icon)
     )
    )
    (component 2 "Formula"
     (name "Calculate PASS Bar coords")
     (interface
      (sequence in)
      (sequence out)
      (input 1
       (type data)
       (name "A")
       (optional yes)
      )
      (input 2
       (type data)
       (name "I")
       (optional yes)
      )
      (input 3
       (type data)
       (name "L")
       (optional yes)
      )
      (input 4
       (type data)
       (name "z")
       (optional yes)
      )
      (output 1
       (type data)
       (name "Result")
       (lock name constraints)
      )
     )
     (implementation
      (component isLocked no)
      (component expr 1 "(a[i]>=L ? [coord(I+z/2,A[i]) coord(I+1-z/2,A[i])] : [coord(I+z/2,0)])")
     )
     (views
      (icon
       (origin 193 408)
       (extent 235 45)
      )
      (detail
       (origin 113 398)
       (extent 664 204)
      )
      (terminals on)
      (active icon)
     )
    )
    (component 3 "Formula"
     (name "Threshold Limit")
     (interface
      (sequence in)
      (sequence out)
      (input 1
       (type data)
       (name "A")
       (optional yes)
      )
      (input 2
       (type data)
       (name "B")
       (optional yes)
      )
      (output 1
       (type data)
       (name "Result")
       (lock name constraints)
      )
     )
     (implementation
      (component isLocked no)
      (component expr 1 "[coord(0,b) coord(a,b)]")
     )
     (views
      (icon
       (origin 288 528)
       (extent 145 25)
      )
      (detail
       (origin 275 578)
       (extent 241 104)
      )
      (terminals on)
      (active icon)
     )
    )
    (component 4 "Constant"
     (name "Spacing")
     (subType "Real")
     (interface
      (sequence in)
      (sequence out)
      (output 1
       (type data)
       (name "Real")
       (lock name constraints)
      )
     )
     (implementation
      (component value Real
       (name "Spacing")
       (datum 0.2)
      )
      (component autoTrigger off)
      (component initializeAtPrerun off)
      (component initializeAtActivate off)
      (component initValue Real
       (datum 0)
      )
     )
     (views
      (icon
       (origin 271 268)
       (extent 78 25)
      )
      (detail
       (origin 217 354)
       (extent 147 32)
       (showFormat real)
      )
      (active detail)
     )
    )
    (component 5 "FromArray"
     (interface
      (sequence in)
      (sequence out)
      (input 1
       (type data)
       (name "Ary")
       (tag "Ary")
      )
      (output 1
       (type data)
       (name "SubAry")
       (tag "Result")
       (lock constraints)
      )
      (output 2
       (type data)
       (name "Type")
       (tag "Type")
       (lock constraints)
      )
      (output 3
       (type data)
       (name "NumDims")
       (tag "NumDims")
       (lock constraints)
      )
      (output 4
       (type data)
       (name "DimSizes")
       (tag "DimSizes")
       (lock constraints)
      )
      (output 5
       (type data)
       (name "TotSize")
       (tag "TotSize")
       (lock constraints)
      )
     )
     (implementation
      (component isLocked no)
      (component expr 1 "Ary")
     )
     (views
      (icon
       (origin 135 548)
       (extent 110 64)
       (iconImage "unbuild.icon")
      )
      (detail
       (origin 252 110)
       (extent 147 160)
      )
      (terminals on)
      (active icon)
     )
    )
    (component 6 "ForCount"
     (name "For Count")
     (interface
      (sequence in)
      (sequence out)
      (input 1
       (type data)
       (name "Count")
       (tag "Count")
       (requires
        (datatype Int32)
        (shape "Scalar")
       )
       (lock constraints)
       (optional yes)
      )
      (output 1
       (type data)
       (name "Count")
       (lock name constraints)
      )
      (buffers in
       (buffer "Count")
      )
     )
     (implementation
      (component count 10)
     )
     (views
      (icon
       (origin 275 578)
       (extent 110 64)
       (iconImage "loop.icon")
      )
      (detail
       (origin 615 253)
       (extent 170 34)
      )
      (active icon)
     )
    )
    (configuration
     (connect D2:1 D0:1)
     (connect D1:1 D0:2)
     (connect D3:1 D0:3)
     (connect D6:0 D0:4)
     (connect D0:0 D0:5)
     (connect I1:1 D1:1)
     (connect D6:1 D1:2)
     (connect I2:1 D1:3)
     (connect D4:1 D1:4)
     (connect I1:1 D2:1)
     (connect D6:1 D2:2)
     (connect I2:1 D2:3)
     (connect D4:1 D2:4)
     (connect D5:5 D3:1)
     (connect I2:1 D3:2)
     (connect I1:1 D5:1)
     (connect D5:5 D6:1)
    )
   )
   (views
    (icon
     (origin 478 498)
     (extent 145 25)
    )
    (panel
     (origin 251 406)
     (extent 378 249)
     (widget 0 detail
      (title off)
      (origin 255 410)
      (extent 371 241)
      (displayMode annotGraph)
      (graphType cartesian)
      (gridType frame)
      (scale 0
       (name "Y name")
       (domainName "X name")
       (pen 1)
       (show 1)
       (range 0 10 4 linear)
      )
      (domain 0 10 4 linear)
      (trace 0 onScale 0
       (name "PASS")
       (pen 3)
       (lineType 1)
       (pointType 6)
      )
      (trace 1 onScale 0
       (name "FAIL")
       (pen 2)
       (lineType 1)
       (pointType 6)
      )
      (trace 2 onScale 0
       (name "Limit")
       (pen 4)
       (lineType 4)
       (pointType 0)
      )
     )
    )
    (detail
     (origin 70 353)
     (extent 720 335)
     (configuration
      (connect D2:1 D0:1
       (Point 430 430)
       (Point 440 430)
       (Point 440 440)
       (Point 450 440)
      )
      (connect D1:1 D0:2
       (Point 430 490)
       (Point 450 490)
      )
      (connect D3:1 D0:3
       (Point 435 540)
       (Point 450 540)
      )
      (connect D6:0 D0:4
       (Point 330 644)
       (Point 330 660)
       (Point 400 660)
       (Point 400 590)
       (Point 450 590)
      )
      (connect D0:0 D0:5
       (Point 610 667)
       (Point 610 680)
       (Point 430 680)
       (Point 430 640)
       (Point 450 640)
      )
      (connect I1:1 D1:1
       (Point 72 440)
       (Point 90 440)
       (Point 90 470)
       (Point 190 470)
      )
      (connect D6:1 D1:2
       (Point 387 610)
       (Point 410 610)
       (Point 410 670)
       (Point 120 670)
       (Point 120 480)
       (Point 190 480)
      )
      (connect I2:1 D1:3
       (Point 72 620)
       (Point 80 620)
       (Point 80 490)
       (Point 190 490)
      )
      (connect D4:1 D1:4
       (Point 366 370)
       (Point 380 370)
       (Point 380 400)
       (Point 170 400)
       (Point 170 500)
       (Point 190 500)
      )
      (connect I1:1 D2:1
       (Point 72 440)
       (Point 80 440)
       (Point 80 410)
       (Point 190 410)
      )
      (connect D6:1 D2:2
       (Point 387 610)
       (Point 410 610)
       (Point 410 670)
       (Point 120 670)
       (Point 120 480)
       (Point 150 480)
       (Point 150 420)
       (Point 190 420)
      )
      (connect I2:1 D2:3
       (Point 72 620)
       (Point 80 620)
       (Point 80 490)
       (Point 160 490)
       (Point 160 430)
       (Point 190 430)
      )
      (connect D4:1 D2:4
       (Point 366 370)
       (Point 380 370)
       (Point 380 400)
       (Point 170 400)
       (Point 170 440)
       (Point 190 440)
      )
      (connect D5:5 D3:1
       (Point 247 600)
       (Point 260 600)
       (Point 260 530)
       (Point 285 530)
      )
      (connect I2:1 D3:2
       (Point 72 620)
       (Point 80 620)
       (Point 80 490)
       (Point 160 490)
       (Point 160 530)
       (Point 250 530)
       (Point 250 540)
       (Point 270 540)
       (Point 270 550)
       (Point 285 550)
      )
      (connect I1:1 D5:1
       (Point 72 440)
       (Point 90 440)
       (Point 90 470)
       (Point 100 470)
       (Point 100 580)
       (Point 132 580)
      )
      (connect D5:5 D6:1
       (Point 247 600)
       (Point 260 600)
       (Point 260 610)
       (Point 272 610)
      )
     )
    )
    (active panel)
    (active panel)
   )
  )
  (configuration
  )
 )
 (views
  (detail
   (configuration
   )
  )
 )
)
