AnsweredAssumed Answered

VRf-Dynamic Image Updating in VEE 3.2?

Question asked by VRFuser on Jul 8, 1996
Paul Thomas wrote:
>
> Changing displayed images during a HP VEE run
> - Paul J. Thomas <thomaspj@netcom.com>
>
> I am running VEE 3.2 under Windows NT on a Pentium. We
> have no instruments connected yet - I'm just developing
> software tools right now.
>
> We want to read a byte stream in from a scanning electron
> beam and create a raster image from it. The image appears
> in HP VEE and then, with a mouse click on a part of the
> displayed image, the screen coordinates of the mouse click
> are taken to send the electron beam to a new location.
>
> I have already done most of this (thanks to the hints
> provided by the Battleship game supplied with 3.2). I can
> accept a raw byte stream, attach a header to make it into a
> BMP image, display it and then use the Panel() commands to locate
> a pointer on the image. BUT...
>
> I have persistent problems with getting VEE to display an
> image when I update its contents. I use a file called active.bmp
> as a scratch file for the current image. I load it using a
> UserFunction called Active_Image, which I read using showPanel().
> I then use From File to delete the file (I've tried rewind and
> close, in various combinations) and then I load a new image into
> active.bmp. When I show the contents of active.bmp using
> showPanel(), I see the _first_ image, not the second. This is
> also true if I display the file by using a Picture object. Once
> I quit the VEE program and look at active.bmp, however, I do see
> the second picture. It's as if VEE cannot read the second image
> until the program stops.
>
> And yet VEE can dynamically read numerical data into and out of
> files during runs! What's going on here?
>
>                                         --Paul J. Thomas
>                                           Alcedo, Incorporated
>                                           Sunnyvale, CA 94086
>                                            (408) 736-0200


I'll bet that VEE has an optimization function that causes it not to
re-read a bitmap from a file it has already read. It would compare the
file name with that already read, and skip the load/display function if
the names are the same.  My suggestion is to change the name of the
bitmap file each time you write it.  You can use a simple hashing
function to generate new file names (or use the time of day).  You can
delete the old files as needed.  Also, definitely close the file after
you write it to cause VEE's cache to flush.  You can also check to see
if Windows NT has a file cache running that you can disable.

Good luck!

-- Andy
--
Andrew C. Fuller    | acfa@eci-esyst.com
Raytheon E-Systems  | Box 12248 | St. Petersburg, FL 33733
(813)381-2000 x3194 | Fax:(813)381-3329

Outcomes