AnsweredAssumed Answered

vrf Some VEE code that works, and then doesn't...

Question asked by VRFuser on Oct 29, 2007
Kevin,
 
The only thing I can think of is that one part of the data is not getting to the addition block. In Vee if a block is missing data it will not execute and with loops it gets more complex because data might show but it is old data, possibly from a previous loop. Data in Vee has to be present during that execution loop, otherwise it is old data. I usually avoid this problem by using variables and setting variables and using them when I need them rather then using data lines.
 
    Greg

Kevin Nievaart <Kevin.Nievaart@eng.monash.edu.au> wrote:

G'day Greg,
The Until Break part is not in the actual code - I just stuck that there
for the continous int32 slider. When watching the dataflow in the code
I've provided, everything executes perfectly. When I put everything
(except the int32 slider and the until break) into a user object and
feed the output from the slider into the object, again everything
executes perfectly. I only get incorrect execution when this very same
user object is placed into the program that communicates with the
hpe1326, and the only thing that happens incorrectly is the module +
channel (which is just text addition) refuses to operate, even if I
explicitly force it.
I've since re-written the code as it was very ugly (I did write it a
long time ago when I wasn't as good...), and now my program works fine,
but I still don't get how a simple addition can refuse to work.
Cheers,

--
Kevin Nievaart
Materials Testing Officer

Dept. Civil Engineering
Monash University, Clayton Campus
Ph. (03) 9905-1165
Fax (03) 9905-1483


"It is known that there is an infinite number of worlds, simply because there is an infinite amount of space for them to be in. However, not every one of them is inhabited. Therefore, there must be a finite number of inhabited worlds. Any finite number divided by infinity is as near to nothing as makes no odds, so the average population of all the planets in the universe can be said to be zero. From this it follows that the population of the universe is also zero, and that any people you may meet from time to time are merely the product of a deranged imagination." - Douglas Adams



Greg Parrott wrote:
> Not too sure but if it works fine as a stand alone it has to be an
> issue of program flow.
>
> What I mean is that the rest of the program never calls the object
> or intiates this portion of the code. What I would do is turn on
> program and data flow and watch how the rest of the program interfaces
> with this portion of code. Also until break in a program can have
> unexpected results it creates a never ending loop and if it is used in
> a multi threaded program it can cause issues with other portions of
> your program not initiating. Also other things to be aware of is that
> execution goes from upper left to lower right on a screen and in most
> cases this works fine but there are times that Vee will get confused
> especially if you rearrange objects on a screen so it is best to
> constrain objects to ensure execution flows the way you expect it too.
> I would use program flow and data flow and see what gets executed you
> will probably locate your problem.
> Greg
>
> */Kevin Nievaart /* wrote:
>
> G'day vrf-ers,
> I made up this crappy little piece of code a couple of years ago. The
> Int32 slider is an input that specifies how many strain gauges an HP
> E1326b will read, from 1 to 48, and the output is supposed to be the
> address of the last gauge read. The format of this address goes xyy,
> where x is the module that reads the last gauge, and the yy being the
> channel number of that module. The device we have has 48 input
> channels
> split into 6 modules x 8 channels per module. So if you were
> reading 1
> gauge, the output address of the last gauge would be 100, if you were
> reading 8 gauges, the output final address would be 107, and if
> you were
> reading say 20 gauges, the output final address would be 303. Not too
> difficult so far....
> Anyway here's my problem. The code below works perfectly fine. If I
> stick this stuff in a user object, it still works fine. However when
> I've got it in the actual program that does the GPIB commands to the
> hpe1326b, the "Module + Channel" addition box refuses to operate.
> Both
> inputs go to the formula box, but nothing comes out of it. This
> happens
> whether I've got the code in a user object or not. Also, the code
> below
> I literally copied from the non-working program and stuck it into
> a new
> program, and it works everytime, it just never works when I actually
> /need/ it.
> I've come across problems like this plenty of times before and
> I've got
> no idea how to resolve it.
> Anyway, end of the day for me, I'll be back in the morning. Any
> answers
> would be very much appreciated,
> Cheers,
>
> --
> --
> Kevin Nievaart
> Materials Testing Officer
>
> Dept. Civil Engineering
> Monash University, Clayton Campus
> Ph. (03) 9905-1165
> Fax (03) 9905-1483
>
>
> "It is known that there is an infinite number of worlds, simply
> because there is an infinite amount of space for them to be in.
> However, not every one of them is inhabited. Therefore, there must
> be a finite number of inhabited worlds. Any finite number divided
> by infinity is as near to nothing as makes no odds, so the average
> population of all the planets in the universe can be said to be
> zero. From this it follows that the population of the universe is
> also zero, and that any people you may meet from time to time are
> merely the product of a deranged imagination." - Douglas Adams
>
>
>
> ---
> You are currently subscribed to vrf as: sherekhan_kl@yahoo.com
> To subscribe please send an email to:
> "vrf-request@lists.it.agilent.com" with the word subscribe in the
> message body.
> To unsubscribe send a blank email to
> "leave-vrf@it.lists.it.agilent.com".
> To send messages to this mailing list, email "vrf@agilent.com".
> If you need help with the mailing list send a message to
> "owner-vrf@it.lists.it.agilent.com".
> Search the "unofficial vrf archive" at
> "http://www.vrfarchive.com/vrf_archive".
> Search the Agilent vrf archive at
> "http://vee.engineering.agilent.com".
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com --- You are currently subscribed to vrf as:
> kevin.nievaart@eng.monash.edu.au To subscribe please send an email to:
> "vrf-request@lists.it.agilent.com" with the word subscribe in the
> message body. To unsubscribe send a blank email to
> "leave-vrf@it.lists.it.agilent.com". To send messages to this mailing
> list, email "vrf@agilent.com". If you need help with the mailing list
> send a message to "owner-vrf@it.lists.it.agilent.com". Search the
> "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive".
> Search the Agilent vrf archive at "http://vee.engineering.agilent.com".
>

---
You are currently subscribed to vrf as: sherekhan_kl@yahoo.com
To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body.
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list, email "vrf@agilent.com".
If you need help with the mailing list send a message to
"owner-vrf@it.lists.it.agilent.com".
Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive".
Search the Agilent vrf archive at "http://vee.engineering.agilent.com".



__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com --- You are currently subscribed to vrf as: ming_meng@agilent.com To subscribe please send an email to: "vrf-request@lists.it.agilent.com" with the word subscribe in the message body. To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com". To send messages to this mailing list, email "vrf@agilent.com". If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com". Search the "unofficial vrf archive" at "http://www.vrfarchive.com/vrf_archive". Search the Agilent vrf archive at "http://vee.engineering.agilent.com".  

Outcomes