LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Numeric slide bug?

I have not seen reference to this problem elsewhere on the board, so I hope I am not asking a common question.

I am currently running CVI 7.0 (393) on Window 2000 XP Professional (not yet installed the upgrade to 7.1 for project schedule reasons).

I have added a Classic-Style Controls -> Numeric -> Horizontal Slide (using classic controls for legacy reasons). It is to represent a 14 bit DAC so it's properties are set up to show an unsigned short int, minimum value 0, maximum value 16383. Everything looks ok while designing in the .uir However, when I start to debug the application, the slide is displayed with a maximum value of 16382 (i.e. 1 less than it should be). The slide does move to a maximum value of 16383 (as shown in the digital display part of the slide), it is just the maximum value label that is wrong.

I have tried to work around this with the following code
SetCtrlAttribute (panel, PANEL_DAC_SLIDE, ATTR_MAX_VALUE, 10000);
which displays the maximum value label as 9999 (again, 1 less than expected).

Has anyone experienced this problem and know what the solution is? Is it simply a case of upgrading to 7.1? Or am I having some sort of finger trouble?
0 Kudos
Message 1 of 6
(3,858 Views)

Hello James,

I was unable to reproduce this behavior on my machine in CVI 7.0 or CVI 7.1 with the 7.1 runtime engine. Are you using a Windows 2000 machine or a Window XP machine? Also, would it be possible for you to include a UIR that demonstrates this behavior? I would suggest updating your runtime engine to the most recent version to see if this corrects the problem.

Thanks.

Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 2 of 6
(3,838 Views)

@Wendy L wrote:
Hello James,

I was unable to reproduce this behavior on my machine in CVI 7.0 or CVI 7.1 with the 7.1 runtime engine. Are you using a Windows 2000 machine or a Window XP machine? Also, would it be possible for you to include a UIR that demonstrates this behavior? I would suggest updating your runtime engine to the most recent version to see if this corrects the problem.

Thanks.




Sorry about the confusion, I am using Windows 2000.

My problem seems to have cleared itself up: I have moved several elements of my panel to a new separate panel, at which point my slide max limit (still on the original panel) started showing the correct number.

I will re-create my original panel / UIR. How do I include a UIR in a post?

0 Kudos
Message 3 of 6
(3,819 Views)
Hello,

The .uir file extension is on the list of extensions that will soon be added as a valid file type for the forum posts. For now, you can rename you file to a different file extension or add it to a zip file and post it that way.
Wendy L
LabWindows/CVI Developer Newsletter
0 Kudos
Message 4 of 6
(3,798 Views)
Wendy L,

I am currently unable to re-create this bug, either by putting the elements moved to the sub panel back into the main panel or by creating a test panel of similar complexity.

For the time being, I'll put it down to finger trouble on my part. If I see a similar problem again, I'll get back to you. In the meantime, thank you for your time and attention.

James.
0 Kudos
Message 5 of 6
(3,781 Views)
Hi James,

Might it may have something to do with the pixel dimensions of the slider? Try playing with the width and see if the 'bug' disappears/re-occurs.

John.
0 Kudos
Message 6 of 6
(3,640 Views)