#! D:\VW/vee -r (saveFormat "1.2") (date "Wed 15/Apr/1998") (SaveCF "no") (filterNAN 0) (component 0 "ROOTCONTEXT" (name "Untitled") (interface ) (implementation (UserFunctions (nextID 4) (context 0 (name "Flip") (interface (sequence in) (sequence out) (input 1 (name "A") (optional yes) ) (input 2 (name "B") (optional yes) ) (input 3 (name "UFName") (optional yes) ) (input 4 (name "X") (optional yes) ) (input 5 (name "Y") (optional yes) ) (input 6 (name "W") (optional yes) ) (input 7 (name "H") (optional yes) ) ) (implementation (locked no) (trigMode deg) (nextID 3) (component 0 "IFTHENELSE" (interface (sequence in) (sequence out) (input 1 (name "A") (optional yes) ) (input 2 (name "B") (optional yes) ) (output 1 (name "Then") (lock name constraints) ) (output 2 (name "Else If") (lock name constraints) ) (output 3 (name "Else") (lock name constraints) ) ) (implementation (component expr "(A!=B) AND B==0") (component expr "(A!=B) AND B==1") ) (views (icon ) (detail (origin 380 113) (extent 142 62) ) (terminals on) (active detail) ) ) (component 1 "FORMULA" (name "hidePanel()") (subType "hidePanel") (interface (sequence in) (sequence out) (input 1 (name "UF") (optional yes) ) (output 1 (name "Result") (lock name constraints) ) ) (implementation (component expr 1 "hidePanel(UF)") ) (views (icon ) (detail (origin 689 249) (extent 125 31) ) (terminals on) (active detail) ) ) (component 2 "FORMULA" (name "showPanel()") (subType "showPanel") (interface (sequence in) (sequence out) (input 1 (name "UF") (optional yes) ) (input 2 (name "X") (optional yes) ) (input 3 (name "Y") (optional yes) ) (input 4 (name "W") (optional yes) ) (input 5 (name "H") (optional yes) ) (output 1 (name "Result") (lock name constraints) ) ) (implementation (component expr 1 "showPanel(UF, X, Y, W, H)") ) (views (icon ) (detail (origin 446 373) (extent 291 102) ) (terminals on) (active detail) ) ) (configuration (connect I1:1 D0:1) (connect I2:1 D0:2) (connect D0:2 D1:0) (connect I3:1 D1:1) (connect D0:1 D2:0) (connect I3:1 D2:1) (connect I4:1 D2:2) (connect I5:1 D2:3) (connect I6:1 D2:4) (connect I7:1 D2:5) ) ) (views (detail (origin 301 67) (extent 604 468) (configuration (connect I1:1 D0:1 (Point 301 120) (Point 323 120) (Point 323 124) (Point 347 124) ) (connect I2:1 D0:2 (Point 301 180) (Point 311 180) (Point 311 164) (Point 347 164) ) (connect D0:2 D1:0 (Point 574 144) (Point 761 144) (Point 761 228) ) (connect I3:1 D1:1 (Point 301 240) (Point 477 240) (Point 477 264) (Point 656 264) ) (connect D0:1 D2:0 (Point 574 124) (Point 601 124) (Point 601 352) ) (connect I3:1 D2:1 (Point 301 240) (Point 381 240) (Point 381 384) (Point 413 384) ) (connect I4:1 D2:2 (Point 301 300) (Point 321 300) (Point 321 404) (Point 413 404) ) (connect I5:1 D2:3 (Point 301 360) (Point 311 360) (Point 311 424) (Point 413 424) ) (connect I6:1 D2:4 (Point 301 420) (Point 321 420) (Point 321 444) (Point 413 444) ) (connect I7:1 D2:5 (Point 301 480) (Point 311 480) (Point 311 464) (Point 413 464) ) ) (stackingOrder 0 1 2) ) (terminals on) (active detail) ) ) (context 1 (name "UF1") (interface (sequence in) (sequence out) (output 1 (type data) (name "L1") (lock constraints) (optional yes) ) (output 2 (type data) (name "L2") (lock constraints) (optional yes) ) ) (implementation (locked no) (trigMode deg) (nextID 4) (component 0 "KNOB" (name "Int Knob") (subType "Integer_Knob") (interface (sequence in) (sequence out) (output 1 (name "Int32") (lock name constraints) ) ) (implementation (component value Int32 (values range 0 10) (data 10 ) ) (component initValue Int32 (data 0 ) ) (component detents 1) ) (views (icon ) (detail (origin 346 237) (extent 130 146) (layout horizontal) (fastmode off) ) (active detail) ) ) (component 1 "KNOB" (name "Int Knob") (subType "Integer_Knob") (interface (sequence in) (sequence out) (output 1 (name "Int32") (lock name constraints) ) ) (implementation (component value Int32 (values range 0 1000) (data 995 ) ) (component initValue Int32 (data 0 ) ) (component detents 1) ) (views (icon ) (detail (origin 516 237) (extent 130 146) (layout horizontal) (fastmode off) ) (active detail) ) ) (component 2 "LABEL" (name "Limit 1") (interface (sequence in) (sequence out) ) (implementation (component labelValue "Limit 1") ) (views (icon (extent 45 0) ) (detail (origin 352 417) (extent 119 46) (just c) ) (title off) (active detail) (font "Arial" 28 bold) ) ) (component 3 "LABEL" (name "Limit 2") (interface (sequence in) (sequence out) ) (implementation (component labelValue "Limit 2") ) (views (icon (extent 45 0) ) (detail (origin 529 418) (extent 104 45) (just c) ) (title off) (active detail) (font "Arial" 28 bold) ) ) (configuration (connect D0:1 O1:1) (connect D1:1 O2:1) ) ) (views (panel (origin 35 23) (extent 303 262) (widget 0 detail (title on) (borderStyle flat) (origin 47 53) (extent 130 146) (layout horizontal) (fastmode off) ) (widget 2 detail (font "Arial" 28 bold) (title off) (borderStyle none) (origin 55 203) (extent 119 46) (just c) ) (widget 1 detail (title on) (borderStyle flat) (origin 197 53) (extent 130 146) (layout horizontal) (fastmode off) ) (widget 3 detail (font "Arial" 28 bold) (title off) (borderStyle none) (origin 205 203) (extent 104 45) (just c) ) ) (detail (origin 323 194) (extent 379 300) (configuration (connect D0:1 O1:1 (Point 478 310) (Point 491 310) (Point 491 200) (Point 661 200) (Point 661 260) (Point 701 260) ) (connect D1:1 O2:1 (Point 648 310) (Point 661 310) (Point 661 420) (Point 701 420) ) ) (stackingOrder 2 1 3 0) ) (terminals on) (active panel) ) ) (context 2 (name "UF2") (interface (sequence in) (sequence out) (input 1 (name "A") (optional yes) ) ) (implementation (locked no) (trigMode deg) (nextID 6) (component 2 "LABEL" (name "Parameter 1") (interface (sequence in) (sequence out) ) (implementation (component labelValue "Parameter 1") ) (views (icon (extent 85 0) ) (detail (origin 61 209) (extent 175 45) (just c) ) (title off) (active detail) (font "Arial" 28 bold) ) ) (component 5 "METER" (interface (sequence in) (sequence out) (input 1 (name "Data") (requires (datatype Real) (shape "Scalar") ) (lock name constraints) ) ) (implementation (component clearAtPrerun 1) (component clearAtActivate 1) (component range 0 10) (component greenRange 0 5) (component yellowRange 5 8) (component redRange 8 10) ) (views (icon ) (detail (origin 61 61) (extent 174 120) (layout horizontal) (fastmode off) ) (active detail) ) ) (configuration (connect I1:1 D1:1) ) ) (views (panel (origin 305 336) (extent 231 248) (widget 1 detail (title on) (borderStyle flat) (origin 337 366) (extent 174 120) (layout horizontal) (fastmode off) ) (widget 0 detail (font "Arial" 28 bold) (title off) (borderStyle none) (origin 335 516) (extent 175 45) (just c) ) ) (detail (origin 35 23) (extent 269 293) (configuration (connect I1:1 D1:1 (Point 35 170) (Point 38 170) (Point 38 121) (Point 58 121) ) ) (stackingOrder 0 1) ) (terminals on) (active detail) ) ) (context 3 (name "UF3") (interface (sequence in) (sequence out) (input 1 (name "A") (optional yes) ) ) (implementation (locked no) (trigMode deg) (nextID 7) (component 2 "LABEL" (name "Parameter 2") (interface (sequence in) (sequence out) ) (implementation (component labelValue "Parameter 2") ) (views (icon (extent 85 0) ) (detail (origin 523 308) (extent 175 45) (just c) ) (title off) (active detail) (font "Arial" 28 bold) ) ) (component 6 "FILLBAR" (name "Fill Bar") (interface (sequence in) (sequence out) (input 1 (name "Data") (requires (datatype Real) (shape "Scalar") ) (lock name constraints) ) ) (implementation (component clearAtPrerun 1) (component clearAtActivate 1) (component range 0 1000) (component indicatortype fillbars) (component split 700) (component split2 900) ) (views (icon ) (detail (origin 238 279) (extent 265 103) (layout horizontal) (fastmode off) ) (active detail) ) ) (configuration (connect I1:1 D1:1) ) ) (views (panel (origin 35 23) (extent 535 174) (widget 1 detail (title on) (borderStyle flat) (origin 47 63) (extent 316 108) (layout horizontal) (fastmode off) ) (widget 0 detail (font "Arial" 28 bold) (title off) (borderStyle none) (origin 385 93) (extent 173 43) (just c) ) ) (detail (origin 207 240) (extent 610 208) (configuration (connect I1:1 D1:1 (Point 207 340) (Point 220 340) (Point 220 330) (Point 235 330) ) ) (stackingOrder 1 0) ) (terminals on) (active panel) ) ) ) (locked no) (trigMode deg) (nextID 30) (component 2 "REPEATUNTILBREAK" (interface (sequence in) (sequence out) (output 1 (name "Continuous") (lock name constraints) ) ) (implementation ) (views (icon (origin 43 74) (extent 74 52) (iconImage "loop.icn") ) (detail ) (terminals on) (active icon) ) ) (component 5 "CALL" (name "Call Function") (interface (sequence in) (sequence out) (output 1 (name "L1") (lock name constraints) (optional yes) ) (output 2 (name "L2") (lock name constraints) (optional yes) ) ) (implementation (component callFunc "UF1") (component parmMode "rev30") ) (views (icon ) (detail (origin 72 164) (extent 196 53) ) (terminals on) (active detail) ) ) (component 10 "FORMULA" (interface (sequence in) (sequence out) (input 1 (name "A") (optional yes) ) (output 1 (name "Result") (lock name constraints) ) ) (implementation (component expr 1 "UF2(random(0, A))") ) (views (icon ) (detail (origin 84 284) (extent 153 32) ) (terminals on) (active detail) ) ) (component 11 "FORMULA" (interface (sequence in) (sequence out) (input 1 (name "A") (optional yes) ) (output 1 (name "Result") (lock name constraints) ) ) (implementation (component expr 1 "UF3(random(0, A))") ) (views (icon ) (detail (origin 84 384) (extent 153 32) ) (terminals on) (active detail) ) ) (component 12 "TOGGLE25" (name "Show Panel 1") (interface (sequence in) (sequence out) (output 1 (name "Toggle") (lock name constraints) ) ) (implementation (component value Int32 (data 1 ) ) (component initializeAtPrerun on) (component initializeAtActivate on) (component initValue Int32 (data 0 ) ) ) (views (icon (extent 94 0) ) (detail (origin 393 187) (extent 94 67) (scaled off) (showTitle on) (format vpaddle) ) (title off) (active detail) ) ) (component 13 "TOGGLE25" (name "Show Panel 2") (interface (sequence in) (sequence out) (output 1 (name "Toggle") (lock name constraints) ) ) (implementation (component value Int32 (data 1 ) ) (component initializeAtPrerun on) (component initializeAtActivate on) (component initValue Int32 (data 0 ) ) ) (views (icon (extent 94 0) ) (detail (origin 393 307) (extent 94 67) (scaled off) (showTitle on) (format vpaddle) ) (title off) (active detail) ) ) (component 14 "TOGGLE25" (name "Show Panel 3") (interface (sequence in) (sequence out) (output 1 (name "Toggle") (lock name constraints) ) ) (implementation (component value Int32 (data 1 ) ) (component initializeAtPrerun on) (component initializeAtActivate on) (component initValue Int32 (data 0 ) ) ) (views (icon (extent 94 0) ) (detail (origin 393 425) (extent 95 70) (scaled off) (showTitle on) (format vpaddle) ) (title off) (active detail) ) ) (component 15 "SHIFTREGISTER" (interface (sequence in) (sequence out) (input 1 (name "Data") ) (output 1 (name "Current") (lock name constraints) ) (output 2 (name "1 Prev") (lock name constraints) (optional yes) ) ) (implementation (component clearAtPrerun 1) (component clearAtActivate 1) ) (views (icon (origin 514 208) (extent 93 25) ) (detail ) (terminals on) (active icon) ) ) (component 16 "SHIFTREGISTER" (interface (sequence in) (sequence out) (input 1 (name "Data") ) (output 1 (name "Current") (lock name constraints) ) (output 2 (name "1 Prev") (lock name constraints) (optional yes) ) ) (implementation (component clearAtPrerun 1) (component clearAtActivate 1) ) (views (icon (origin 514 328) (extent 93 25) ) (detail ) (terminals on) (active icon) ) ) (component 17 "SHIFTREGISTER" (interface (sequence in) (sequence out) (input 1 (name "Data") ) (output 1 (name "Current") (lock name constraints) ) (output 2 (name "1 Prev") (lock name constraints) (optional yes) ) ) (implementation (component clearAtPrerun 1) (component clearAtActivate 1) ) (views (icon (origin 514 448) (extent 93 25) ) (detail ) (terminals on) (active icon) ) ) (component 19 "FORMULA" (interface (sequence in) (sequence out) (input 1 (name "A") (optional yes) ) (input 2 (name "B") (optional yes) ) (output 1 (name "Result") (lock name constraints) ) ) (implementation (component expr 1 "Flip(A, B, \"UF2\", 320, 155, 242, 250)") ) (views (icon ) (detail (origin 658 319) (extent 265 42) ) (terminals on) (active detail) ) ) (component 20 "FORMULA" (interface (sequence in) (sequence out) (input 1 (name "A") (optional yes) ) (input 2 (name "B") (optional yes) ) (output 1 (name "Result") (lock name constraints) ) ) (implementation (component expr 1 "Flip(A, B, \"UF3\", 12, 407, 550, 180)") ) (views (icon ) (detail (origin 658 439) (extent 265 42) ) (terminals on) (active detail) ) ) (component 21 "TOGGLE25" (name "Quit") (interface (sequence in) (sequence out) (input 1 (type control) (name "Reset") (lock name constraints) (optional yes) ) (output 1 (name "Toggle") (lock name constraints) ) ) (implementation (component value Int32 (data 0 ) ) (component initializeAtPrerun on) (component initializeAtActivate on) (component initValue Int32 (data 0 ) ) ) (views (icon (extent 30 0) ) (detail (origin 414 549) (extent 52 23) (scaled off) (format button) ) (title off) (active detail) ) ) (component 22 "IFTHENELSE" (interface (sequence in) (sequence out) (input 1 (name "A") (optional yes) ) (output 1 (name "Then") (lock name constraints) ) (output 2 (name "Else") (lock name constraints) ) ) (implementation (component expr "A==1") ) (views (icon ) (detail (origin 555 524) (extent 61 53) ) (terminals on) (active detail) ) ) (component 23 "BREAK" (interface (sequence in) ) (implementation ) (views (icon (origin 680 562) (extent 41 16) ) (detail ) (terminals on) (active icon) ) ) (component 24 "DELAY" (interface (sequence in) (sequence out) (output 1 (name "Done") (tag "Done") (lock constraints) ) ) (implementation (component delay 0.25) ) (views (icon (origin 420 632) (extent 40 16) ) (detail (origin 402 624) (extent 76 32) ) (active icon) ) ) (component 25 "LABEL" (name "MultiPanels Example ") (interface (sequence in) (sequence out) ) (implementation (component labelValue "MultiPanels Example ") ) (views (icon (extent 146 0) ) (detail (origin 239 68) (extent 303 45) (just c) ) (title off) (active detail) (font "Arial" 28 bold) ) ) (component 26 "NOTE" (interface ) (implementation (component text 41 5 VEE MultiPanels Example Program / v1.0 / 14 apr 98 / gvg * This little program demonstrates how to make a VEE program that uses multiple panels for displaying information and obtaining inputs from the user. This program allows the user to select (with switches) which of three UserFunction panels he or she wishes to display. The three UserFunctions (and their panels) are defined as follows: % The UF1() panel demonstrates using panels to perform inputs. It provides three rotary Knobs that can be used to specify limits on the range of values provided to the other two UserFunctions. (This program uses random numbers to simulate input data, and the Knobs specify the maximum random values.) % The UF2() panel simply presents a Meter to display the (random) number generated by the main program. % The UF3() panel is similar, and simply presents a Fill Bar to display the (random) number generated by the main program. The display of each UserFunction panel is controlled by a Toggle control. The value of the Toggle control is fed into a Shift Register so that the new value of the Toggle can be compared with the old. This comparison is performed by a UserFunction named Flip(), which determines if the value has changed and then either uses ShowPanel() to show the UserFunction panel, or HidePanel() to hide it. (If you execute ShowPanel() every time you check the Toggle, the UserFunction panel tends to flicker annoyingly, so you only show or hide it when you need to.) The program operates in a loop, checking UF1() for new random-number limits, updating UF2()and UF3() with new random numbers, checking the three Toggles that control the three UserFunction panels for updates, checking a Toggle to see if the user wants to exit the program, and then delaying for a quarter of a second (to keep the update rate visible to the user). Please note that when you create the UserFunction panels, you do NOT set them to "Show Panel On Execute". The ShowPanel() function handles the display of the panel and doing it automatically just confuses the poor little program. [<>] gvg ) ) (views (icon (origin 226 464) (extent 68 52) (iconImage "notepad.icn") ) (detail (origin 56 96) (extent 709 548) (editing enabled) ) (active icon) ) ) (component 29 "FORMULA" (interface (sequence in) (sequence out) (input 1 (name "A") (optional yes) ) (input 2 (name "B") (optional yes) ) (output 1 (name "Result") (lock name constraints) ) ) (implementation (component expr 1 "Flip(A, B, \"UF1\", 12, 155, 308, 250)") ) (views (icon ) (detail (origin 662 199) (extent 257 42) ) (terminals on) (active detail) ) ) (configuration (connect D0:1 D1:0) (connect D1:0 D2:0) (connect D1:1 D2:1) (connect D2:0 D3:0) (connect D1:2 D3:1) (connect D3:0 D4:0) (connect D4:0 D5:0) (connect D5:0 D6:0) (connect D4:1 D7:1) (connect D5:1 D8:1) (connect D6:1 D9:1) (connect D8:1 D10:1) (connect D8:2 D10:2) (connect D9:1 D11:1) (connect D9:2 D11:2) (connect D6:0 D12:0) (connect D12:1 D12:1) (connect D12:1 D13:1) (connect D13:1 D14:0) (connect D12:0 D15:0) (connect D7:1 D18:1) (connect D7:2 D18:2) ) ) (views (panel (origin 0 24) (extent 579 613) (widget 4 detail (title off) (borderStyle convex) (origin 32 96) (extent 96 66) (scaled off) (showTitle on) (format vpaddle) ) (widget 5 detail (title off) (borderStyle convex) (origin 142 96) (extent 96 66) (scaled off) (showTitle on) (format vpaddle) ) (widget 6 detail (title off) (borderStyle convex) (origin 252 96) (extent 96 66) (scaled off) (showTitle on) (format vpaddle) ) (widget 12 detail (title off) (borderStyle none) (origin 440 114) (extent 52 23) (scaled off) (format button) ) (widget 16 detail (font "Arial" 28 bold) (title off) (borderStyle none) (origin 130 34) (extent 303 45) (just c) ) ) (detail (origin 0 24) (extent 579 559) (configuration (connect D0:1 D1:0 (Point 119 100) (Point 170 100) (Point 170 143) ) (connect D1:0 D2:0 (Point 170 219) (Point 170 263) ) (connect D1:1 D2:1 (Point 300 180) (Point 320 180) (Point 320 240) (Point 30 240) (Point 30 300) (Point 51 300) ) (connect D2:0 D3:0 (Point 170 318) (Point 170 363) ) (connect D1:2 D3:1 (Point 300 200) (Point 330 200) (Point 330 340) (Point 30 340) (Point 30 400) (Point 51 400) ) (connect D3:0 D4:0 (Point 170 418) (Point 170 440) (Point 340 440) (Point 340 160) (Point 440 160) (Point 440 184) ) (connect D4:0 D5:0 (Point 440 256) (Point 440 304) ) (connect D5:0 D6:0 (Point 440 376) (Point 440 422) ) (connect D4:1 D7:1 (Point 489 220) (Point 511 220) ) (connect D5:1 D8:1 (Point 489 340) (Point 511 340) ) (connect D6:1 D9:1 (Point 490 460) (Point 511 460) ) (connect D8:1 D10:1 (Point 609 330) (Point 625 330) ) (connect D8:2 D10:2 (Point 609 350) (Point 625 350) ) (connect D9:1 D11:1 (Point 609 450) (Point 625 450) ) (connect D9:2 D11:2 (Point 609 470) (Point 625 470) ) (connect D6:0 D12:0 (Point 440 497) (Point 440 546) ) (connect D12:1 D12:1 (Point 468 560) (Point 490 560) (Point 490 530) (Point 390 530) (Point 390 560) (Point 411 560) ) (connect D12:1 D13:1 (Point 468 560) (Point 490 560) (Point 490 550) (Point 522 550) ) (connect D13:1 D14:0 (Point 658 540) (Point 700 540) (Point 700 559) ) (connect D12:0 D15:0 (Point 440 574) (Point 440 629) ) (connect D7:1 D18:1 (Point 609 210) (Point 629 210) ) (connect D7:2 D18:2 (Point 609 230) (Point 629 230) ) ) (stackingOrder 0 1 3 2 6 5 4 7 8 9 10 11 14 15 13 16 12 17 18) ) (active detail) (numberFormats (realFormat standard) (realSigDigits 4) (realRadixSpec 4) (integerBase decimal) ) ) )