AnsweredAssumed Answered

vrf How to control the number of digits to be sent ?

Question asked by VRFuser on Apr 18, 2008
Hi Tom,
I also cut my teeth on code passed down from someone else. Of course, back then VEE came packaged in a box with a bunch of floppy disks, now I have a hard time finding a PC that even has a floppy drive! I learned a lot, but also learned how NOT to do things.
 
Your thinking about declaring the constant is correct; the #H is just VEE’s way of telling you that you’re looking at the hex representation of the integer. VEE does its calculations the same whether you declare a number in hex, decimal or anything else. It really boils down to how you prefer to view the numbers. Sometimes hex is the most convenient way of dealing with something. For me, that’s usually when communicating with a device that has firmware written in C. Bottom line is: if the Uint8 constant value is sufficient for your program; I wouldn’t mess with it. Probably not how I would do it, but I don’t have to use it.
 
Try not to fret about it over the weekend,
 
Cheers,
Doug
 
 
 
Douglas B. Rudrow
Systems Development Lab Technologist
Aurora Networks
2803 Mission College Blvd.
Santa Clara, California, 95054
U.S.A.
(408) 235-7000 Main
(408) 235 7084 Direct
HYPERLINK "mailto:rvilla@aurora.com"drudrow@aurora.com
 
 
-----Original Message-----
From: Tom Warner [mailto:darth_ourkid@hotmail.com]
Sent: Friday, April 18, 2008 2:23 AM
To: Douglas Rudrow; VRF
Subject: RE: [vrf] A couple more...
 

Doug,
 
I did indeed inherit the code. Basically I've been asked to make improvements to a machine using VEE pro. Due to my newbie-ness I focused on getting it working through mechanical changes, but am analysing the program as far as possible as it's evidently quite a botch.
 
The tip about seeing what terminals do ihas sorted out my problems with the button. The inputs were to enable/disable editing of the button, which makes sense.
 
As for the tank, I'm still a little confused. Am I right that declaring a constant as #Hffff is declaring it as ffff in hex, i.e. 65535? (basically the program reads the position of a piston, deducts the value from the above to invert it, as when the piston extends the tank goes down, before dividing by 10 and inputting it into the tank)
 
Thanks again,
Tom
  _____  

From: drudrow@Aurora.com
To: vrf@agilent.com
Date: Thu, 17 Apr 2008 14:39:07 -0700
Subject: RE: [vrf] A couple more...
Hi Tom,
For your first question; is the “Start Test” button a standard toggle control or a cyclic button? Either way, the fact that the lines running to the inputs are dashed indicates that the inputs are control inputs; I suspect the input coming from the Until Break is a reset terminal. I’m also going to assume that you’ve inherited this code from someone else, since if you wrote it, you also added the terminals and wired them up. Where does the “other input” come from? It has to be connected to something. You can find out what the inputs are by either turning on the “Show Terminals” property of the button, or slowly dragging your cursor very close to the terminal in question.
 
For the “tank” question. Again, this must not be code created by you. If the data value into the tank can be as large as 6500, then the Max Value input is quite wrong. All of the value inputs on a tank are typed for Real64 scalars, in other words they need to be data that can be converted to Real64. If the data is going to be as large as 6500, you’ll need to replace the Uint8 constant that has a value of 120 with something that 6500 or greater can be put into. At least Int16. Uint8 can only be from 0 to 255. The Min and Max Value range of a tank is huge, the bounds of Real64. Now if the program works just fine and the data value into the tank never exceeds 120 there’s no problem.
 
The third question is the easy one. You are quite right, adding a data input to a For Count object does indeed determine the number of iterations.
 
Best of luck, and never hesitate to ask questions,
 
Doug
 
 
Douglas B. Rudrow
Systems Development Lab Technologist
Aurora Networks
2803 Mission College Blvd.
Santa Clara, California, 95054
U.S.A.
(408) 235-7000 Main
(408) 235 7084 Direct
HYPERLINK "mailto:rvilla@aurora.com"drudrow@aurora.com
 
 
-----Original Message-----
From: Tom Warner [mailto:darth_ourkid@hotmail.com]
Sent: Thursday, April 17, 2008 1:40 PM
To: VRF
Subject: [vrf] A couple more...
 
Hi again guys,
 
First of all, I’d just like to say a big thank you to Shawn and Peter for their help and their patience with my newbie-ness. I found a couple more things today though, and seeing as I think they’ll be the last I thought I’d push my luck.  =)
 
So, first of all I have a couple of ‘Selection Controls’ which are confusing me, I get the basic idea – it outputs 0, you click on it and it outputs 1, you click on it again it goes back to 0, but some of mine appear to have inputs beyond just the progression path that pings it. I’ve attached an example. It seems particularly odd that the output from the ‘until break’ loop not only pings the switch, but is also an input. The other input comes from right near the start, before the program branches at all. Very odd!
 
Secondly (also with an example), the program has a ‘tank’, but I can’t figure out the calibration. The way I figure it the value put into it varies between o and 6500 or so, yet the two integers I assume are to calibrate its scale are way too small. I was wondering if I’m missing something, or must my calculation of the input value be wrong?
 
Finally, I found a for count loop which has an input in it (my final little picture). I just wanted to check that the number of iterations of the loop is determined by the value it’s fed?
 
Thanks again,
Tom
 
  _____  

News, Sports, Entertainment and Weather on your mobile. HYPERLINK "http://mobile.uk.msn.com/pc/msn_content.aspx"
Text MSN to 63463 Now.
---
You are currently subscribed to vrf as: drudrow@aurora.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".

---
You are currently subscribed to vrf as: darth_ourkid@hotmail.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". �
 
  _____  

News, Sports, Entertainment and Weather on your mobile. HYPERLINK "http://mobile.uk.msn.com/pc/msn_content.aspx"Text MSN to 63463 Now.

---
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