AnsweredAssumed Answered

V4.0 Propagation - Whats our opinion

Question asked by VRFuser on May 5, 1997
The "A-1" is causing the formula to fire the XEQ.
"Set Values" fires due to the XEQ even though the 'Array' input is NOT  
satisfied yet.

There are two easy fixes:
1.  (this is weak but demonstrates VEE's execution) Move the "Get  
GL_Selected_Test_Count" to the most upper left area of the user function.  
This will force VEE to execute the "GET ABC" first.
2.  (this is the safe way) Put a START box above the FORMULA box, feeding  
into it. The will force VEE to execute the "GET ABC" first regardless of  
how the boxes on the screen are arranged.

Regards

Rob Marquardt
System Test Engineering
Rockwell Automation / Allen-Bradley
Milwaukee, Wisconsin, USA




----------
From:  Braeton G. Taylor[SMTP:btaylor@hns.com]
Sent:  Tuesday, May 06, 1997 9:03 AM
To:  hpvxd_xc
Cc:  btaylor
Subject:  VRf: V4.0 Propagation - Whats our opinion


VRf: HP VEE 4.0 users,

I would like to get other HP VEE 4.0 users opinions on the following
program.  It uses the Set Values object from 3.x (not the new 4.0 one)
In my opinion HP VEE 4.0 is violation it own rules of execution.  From  
the
HP VEE 4.0 Help text:

Propagation Summary
-------------------
  

   The following is a summary of the propagation rules that HP VEE
   follows when a program executes in compiled mode:
  

   o Data flows through objects from left-to-right -- sequence flows
     from top-to-bottom.
   o All data and XEQ input pins must be connected.
   o Objects with no data input pins or sequence input pin connections
     operate first.


This program "works" in V3.x and V4.0 (compatability mode), but
not in V4.0 compiled mode.  I attached a similar program at the bottom.


Main:

Integer Const
--------------
|0: 4        |       ------------------
|1: 2        |------| Set Global (ABC) |
|2: 5        |      |                  |
--------------       -------------------
                             |
                             |
                             |
                  -----------------------------
        ---      |-                            |
       | 2 |---->|A | User Object or Function  |
        ---      |-          FOO               |
                 |                             |
                  -----------------------------



FOO:
-------------------------------------------------------------------------- 
----
|
|  ------------               ---------------------------
|  |          |              |  Set Values (From V3.x)  |
|  | Get ABC  |--------------| Array   |
|  |          |              |    |
|  ------------              |    |
|                            |    |
|    ---                     |    |
|   | 5 |--------------------| Datum   |    -------------
|    ---                     |    |    |            |
|                            |     Array |----| Set Global |
|         -----              |    |    |    (ABC)   |
A--------| A-1 |-------------| Index   |     ------------
|         -----              |    |
|           |                |    |
|           |                |    |
|           -----------------| XEQ   |
|                            |    |
|                             ----------------------------
|
|
-------------------------------------------------------------------------- 
----



The purpose of the function FOO is to modify a value in the array ABC.
In v4.0 compiled mode the A-1 executes first then the Set Values (via the  
XEQ
pin) then the Set Global (ABC) then the 5 then the Get ABC.  Hence ABC
is set to Nil.
Being the the "Get ABC" and the "5" are both unconstrained objects
they should execute first before a data constained object like the
"A-1".  The "fix" for this case I realize is easy, just constrain the
"A-1" until the "Get ABC" and "5" have executed, but I should not
have to do that here.

Here is what HP VEE support said on the "problem".  The program
I sent them is a little different but was very similar.

========================================================================== 
====

Sir:

I went through this program in detail and here is what I can say:

% The UserFunction fails as you say it does.  The variable feeding the
   Array input on the Set Values executes after the path through the
   Formula; since the Formula drives the XEQ pin on the Set Values
   object, the Set Values fires *immediately* and so the Array input
   is not satisfied.

% Under compatibility mode, the variable feeding the Array input  
executes
   before the path through the Formula and so it works.

% Wiring the "Get_GL_..." sequence-out pin to the "o_finde" sequence-in
   pin generates operational behavior.  Reversing the sequencing causes
   the problem.  So the issue is the sequencing of the two branches.

% I consulted the lab guys on this.  Technically speaking, either
   execution sequence is legal ... because while "ofinde" has an input
   pin, as far as VEE is concerned in UserFunction execution, the "Seq"
   input pin is an object and it has no input wiring.

   This is a little pettifogging because they admit that the old VEE
   execution engine would always execute the path through the Formula  
first.

% The lab is perfectly aware of this issue but a change is unlikely, for
   the following reasons:

    - VEE 4.0 operation is documented to have differences between VEE 3.0
      operation ... this is why compatibility mode is available.

    - This specific problem only arises on Set Values and a few other
      objects that have XEQ pins that violate normal dataflow operation.

    - Set Values is now a redundant object anyway, since the same
      functionality can be performed in a Formula box and will work as
      desired:

      +-----------------------------------------+
      |                 Formula                 |
      +-------+-------------------------+-------+
      | Array |                         |       |
      | Datum |[ Array[Index] = Datum ] | Array +--->
      | Index |                         |       |
      +-------+-------------------------+-------+

[<>] regards -- gvg
========================================================================== 
====


What is your opinion?


Here is a V3.2x compatable program that can be run under 4.0,  remember
to set to compiled mode.  Use the step to "see" the problem.

##############Cut below this line################
(saveFormat "2.0")
(date "Wed 30/Apr/1997 12:50:36 EDT")
(veerev "3.2")
(platform "HP9000s700")
(SaveCF no)
(filterNAN 0)
(component 0 ROOTCONTEXT
(name "Untitled")
(implementation
  (locked no)
  (trigMode deg)
  (nextID 7)
  (component 0 CONTEXT
   (name "Util_All_Tests_In_Seq_Selected")
   (description2 3
"This needs to be run after every change to the selected tests."
"No "Break" is needed because this is not a selection but a "
"task to be executed after all other selections (with "Break"s)."
   )
   (interface
(input 1
  (name "Seq")
  (requires
   (datatype Int32)
   (shape "Scalar")
  )
  (optional yes)
)
   )
   (implementation
(locked no)
(trigMode deg)
(nextID 28)
(component 15 TOGLOBAL
  (name "Set GL_Selected_Test_Count")
  (interface
   (input 1
    (name "Data")
    (tag "Data")
   )
  )
  (implementation
   (globalName "GL_Selected_Test_Count")
  )
)
(component 16 TOARRAY
  (interface
   (input 1
    (name "Array")
    (tag "Array")
    (lock constraints)
   )
   (input 2
    (name "Datum")
    (tag "Datum")
    (requires
  (shape "Scalar")
    )
    (lock constraints)
   )
   (input 3
    (name "Index 1")
    (tag "Index 1")
    (requires
  (datatype Int32)
  (shape "Scalar")
    )
    (lock constraints)
   )
   (input 4
    (type trigger)
    (name "XEQ")
    (lock name constraints)
   )
   (output 1
    (name "Array")
    (tag "Array")
    (lock constraints)
   )
  )
  (implementation
   (numDims 1)
  )
)
(component 17 FROMGLOBAL
  (name "Get GL_Selected_Test_Count")
  (interface
   (output 1
    (name "Data")
    (tag "Data")
    (lock name constraints)
   )
  )
  (implementation
   (globalName "GL_Selected_Test_Count")
  )
)
(component 21 FORMULA
  (interface
   (input 1
    (name "A")
    (optional yes)
   )
   (output 1
    (name "Result")
    (lock name constraints)
   )
  )
  (implementation
   (expr 1 "GL_Number_Of_Tests[A]")
  )
)
(component 22 FORMULA
  (name "To_Index")
  (interface
   (input 1
    (name "A")
    (optional yes)
   )
   (output 1
    (name "Result")
    (lock name constraints)
   )
  )
  (implementation
   (expr 1 "A-1")
  )
)
(configuration
  (connect D1:1 D0:1)
  (connect D2:1 D1:1)
  (connect D3:1 D1:2)
  (connect D4:1 D1:3)
  (connect D3:0 D1:4)
  (connect D4:1 D3:1)
  (connect I1:1 D4:1)
)
   )
  )
  (component 1 TOGLOBAL
   (name "Set GL_Selected_Test_Count")
   (interface
(input 1
  (name "Data")
  (tag "Data")
)
   )
   (implementation
(globalName "GL_Selected_Test_Count")
   )
  )
  (component 2 LITERALCONSTANT
   (name "Text")
   (interface
(output 1
  (name "Text")
  (lock name constraints)
)
   )
   (implementation
(value Text
  (numDims 1)
  (size 4)
  (data
    [ "0" "0" "0" "0" ]
  )
)
(initValue Text
  (data  "")
)
   )
  )
  (component 3 LITERALCONSTANT
   (name "Text")
   (interface
(output 1
  (name "Text")
  (lock name constraints)
)
   )
   (implementation
(value Text
  (numDims 1)
  (size 4)
  (data
    [ "4" "3" "2" "5" ]
  )
)
(initValue Text
  (data  "")
)
   )
  )
  (component 4 TOGLOBAL
   (name "Set GL_Selected_Test_Count")
   (interface
(input 1
  (name "Data")
  (tag "Data")
)
   )
   (implementation
(globalName "GL_Number_Of_Tests")
   )
  )
  (component 5 CONSTANT
   (name "Integer")
   (interface
(output 1
  (name "Int32")
  (lock name constraints)
)
   )
   (implementation
(value Int32
  (data  2)
)
(initValue Int32
  (data  0)
)
   )
  )
  (component 6 START25
  )
  (configuration
   (connect D4:0 D0:0)
   (connect D5:1 D0:1)
   (connect D6:0 D1:0)
   (connect D2:1 D1:1)
   (connect D1:0 D4:0)
   (connect D3:1 D4:1)
  )
)
(viewFor -1
  (active detail)
  (detail
   (geometry 0 53 1242 916)
   (configuration
(viewFor 0
  (active detail)
  (icon
   (geometry 476 495 180 15)
  )
  (detail
   (geometry 193 479 934 322)
   (configuration
    (viewFor 15
  (active icon)
  (icon
   (geometry 942 555 168 14)
  )
  (detail
   (geometry 551 365 348 51)
  )
  (terminals on)
    )
    (viewFor 16
  (active detail)
  (icon
   (geometry 660 175 80 51)
   (iconImage "build.icn")
     )
  (detail
   (geometry 770 519 63 86)
  )
  (terminals on)
    )
    (viewFor 17
  (active icon)
  (icon
   (geometry 459 524 174 16)
  )
  (detail
   (geometry 238 152 394 57)
     )
  (terminals on)
    )
    (viewFor 21
  (active detail)
  (icon
     )
  (detail
   (geometry 443 626 154 29)
  )
  (terminals on)
    )
    (viewFor 22
  (active icon)
  (icon
   (geometry 243 633 55 14)
  )
  (detail
   (geometry 218 305 64 30)
     )
  (terminals on)
    )
    (connect D1:1 D0:1
  (points 2 875 562 939 562)
    )
    (connect D2:1 D1:1
  (points 2 635 532 717 532)
    )
    (connect D3:1 D1:2
  (points 4 649 640 670 640 670 552 717 552)
    )
    (connect D4:1 D1:3
  (points 4 300 640 390 640 390 572 717 572)
    )
    (connect D3:0 D1:4
  (points 5 530 657 530 680 680 680 680 592 717 592)
    )
    (connect D4:1 D3:1
  (points 2 300 640 410 640)
    )
    (connect I1:1 D4:1
  (points 4 193 640 200 640 200 640 240 640)
    )
   )
   (stackingOrder 2 1 0 3 4)
  )
  (terminals on)
)
(viewFor 1
  (active detail)
  (icon
   (geometry 566 223 168 14)
  )
  (detail
   (geometry 558 183 214 54)
  )
  (terminals on)
)
(viewFor 2
  (active detail)
  (icon
  )
  (detail
   (geometry 225 163 210 95)
  )
)
(viewFor 3
  (active detail)
  (icon
   )
  (detail
   (geometry 225 323 210 95)
  )
)
(viewFor 4
  (active detail)
  (icon
   (geometry 566 363 168 14)
  )
  (detail
   (geometry 545 346 241 48)
  )
  (terminals on)
)
(viewFor 5
  (active detail)
  (icon
  )
  (detail
   (geometry 41 627 78 27)
   (showFormat int)
  )
)
(viewFor 6
  (active detail)
  (icon
  )
  (detail
   (geometry 636 110 49 20)
  )
  (title off)
)
(connect D4:0 D0:0
  (points 2 660 396 660 458)
)
(connect D5:1 D0:1
  (points 2 121 640 160 640)
)
(connect D6:0 D1:0
  (points 2 660 132 660 162)
)
(connect D2:1 D1:1
  (points 2 437 210 515 210)
)
(connect D1:0 D4:0
  (points 2 660 239 660 325)
)
(connect D3:1 D4:1
  (points 2 437 370 502 370)
)
   )
   (stackingOrder 3 5 4 1 6 2 0)
  )
  (titleBg "Gray")
  (titleFg "Black")
  (numberFormats
   (realFormat standard)
   (realSigDigits 4)
   (realRadixSpec 4)
   (integerBase decimal)
  )
)
)
##############Cut above this line################

--
Braeton Taylor
Software Technology Department
Hughes Network Systems
301-212-7980
301-548-1272 FAX
btaylor@hns.com
http://engweb/~btaylor/ (Intranet only)

Outcomes