LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Xcontrol with picture does not work the same in debug and as an executable

I am developing an Xcontrol in which I copy the image of a control into a picture box. The picture box is much smaller than the image copied which is part of the design. When the Xcontrol has a new value sent to it, it will adjust the top location of the picture within the picture box, thus moving the picture within the picture box. When I am in the LabVIEW 8.2 debug mode, it apperas to work as expected. When I create an executable, it does not work. I have included a zip file with an example fo the X control, project, etc that I am attempting to perform. There is detailed information within the main VI, "A turn of the wheel.vi", that explains what I am trying to accomplish. There is also an executable within this zip file. by executing both the VI and .exe at the same time, you can see the difference in behavior of the two. Since the source is provided, perhaps you can test your potential solution before replying so that we get a real solution to this problem. Thanks for your help.   Ciao!
0 Kudos
Message 1 of 3
(2,746 Views)
UPDATE!!!!
 
Included is a slight modification to the Xcontrol Facade VI. In this test, I added a 2nd little box. I am not sure why I decided to try this, but I did. I had the 2nd little box display the horizontal and vertical control bars and enlarged it to determine if any part of the image was being placed into my 2nd little box. All of a sudden, the 1st and 2nd little box, in both the debug mode and executable mode shows the image. I am not sure why adding the horizontal and vertical bars changed anything. I had tried adding a 2nd box earlier without the bars and nothing changed. What I did notice, is that the image offset in the executable is different than in the debug mode. See image in my 2nd little box. The image is cropped at the beginning in the executable version. The problem with this, at this point, is that if I input the a number, the debug mode displays the number correctly but the executable is 2 digits off because the image is incorrrectly offset.
 
Now I need to know if there is some type of initialization I can do with the image functions so that they execute the same in both modes of operation. I feel this is some type of software bug in the NI code, but will work around it if someone has a easy solution that will not cause me to modify my code when NI corrects the problem in a future release.
 
I'll keep playing with it and get back to you if I find a work around for the problem.
 
Thanks again for any of your help!
0 Kudos
Message 2 of 3
(2,733 Views)

Final Answer !!!

I am not sure if this is a work around or the way we really need to do this, but I'll explain it rather than resending all of the VIs.

I created a new blank VI. I copied the Numbers indicator from the Facade VI into my blank VI. I performed a "Get Image" method on the Numbers indicator. I place the "Image Data" output into another indicator. I then saved the output using "Make current values default". I saved this VI for later use. I created a constant from the "Image Data" output current saved value. I copied this constant into my Facade VI and used the constant rather than the "Get Image" on the Numbers indicator. This cleared up my problem.

 

I hope this helps anyone else who has these kind of problems in the future.

Ciao Ciao.

 

0 Kudos
Message 3 of 3
(2,698 Views)