LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Replacing controls from a customised palette gives wrong control

Solved!
Go to solution

I have customised my system style control palette with some additional system style controls (arrays, clusters, DAQmx channels etc). All works fine when I place a new control onto a vi FP, however when I try to replace an existing control I sometimes get the wrong control, depending whether the intended replacement comes after my additions in the custom palette file.

 

The following sequence of images illustrates the bug.

Clipboard01.gifClipboard02.gifClipboard03.gif

Speculating, I;d say it looks like the replacement that is dropped is the control that is occupying the slot in that the desired control did occupy in the original palette file (i.e. LabVIEW seems to be getting the write control, but then indexing it out of the uncustomised palette file.

 

Workarounds include - learning the mapping between selected and dropped replacements, and not customising the palette file. Neither is particularly desirable !

--
Gavin Burnell
Condensed Matter Physics Group, University of Leeds, UK
http://www.stoner.leeds.ac.uk/
0 Kudos
Message 1 of 10
(4,319 Views)

Hi Gavin,

 

I was wondering how you added the controls to the system style control palette.  Did you go to Tools»Advanced»Edit Palette Set to then edit the palette or did you add the controls in a directory only?

 

When the Functions or Control Palette are edited via the Edit Palette Set, the objects should be correctly placed in the correct directory and also have the correct index in the Palette.

 

Best regards,

 

Tony Gibbs

Applications Engineer

NIUK

0 Kudos
Message 2 of 10
(4,281 Views)

I did Tools>Advanced>Edit Palette Set and then right clicked and did Insert Control and navigated to where my custom control lives (which is in a custom directory managed by my revision control system). I ddin't quite followwhen you wrote:

 

 When the Functions or Control Palette are edited via the Edit Palette Set, the objects should be correctly placed in the correct directory and also have the correct index in the Palette.

 

Do you mean I should also place the .ctl files in a specific directory, or that LabVIEW should do this ? I didn;t recall seeing anything in the documentation that stipulated that all entries in a palette file ought to be in the same directory on disc.

 

Gavin

--
Gavin Burnell
Condensed Matter Physics Group, University of Leeds, UK
http://www.stoner.leeds.ac.uk/
0 Kudos
Message 3 of 10
(4,272 Views)

Hi Gavin,

 

Edit Palette Set is the correct way and LabVIEW handles everything for you.  I used version 8.6.1 this morning, adding and using custom controls via the Controls Palette.

 

Which version of LabVIEW are you using?  I can try this on the same version to see if I can replicate the issue.

 

Best regards,

 

Tony Gibbs

Applications Engineer

NIUK

0 Kudos
Message 4 of 10
(4,265 Views)

This is in 8.6.1 - although I've previously seen it in 8.5, 8.5.1 and 8.6 - can't remember about 8.2, buth I think it was there. I missed out 8.0,having jumped straight from 7.1.1 to 8.2 and then rather quickly to 8.5.

 

A few other points - I only get this with custom controls added to the System palette - other palettes work fine. I have rearranged my palette order so that the system palette is thetop one and always open.

 

I've also tried adding the custom controls to the synch'd directory for the palette but with similar results. The difference between the requested control and the actual control I get gets progressively worse as I go down the palette, but I can't quite figure out at what point it gets worse by.

 

I've attched a zip file containing my System palette and trhe custom controls so you can see if you can replicate the issue.  On a new FP, drop and instance of say system numeric, then replace it in turn with the various system controls. I get a problem at system array, after which I become one out. The next probelm happens around system label after which the actually replaced control and the desired control become 2 out and so on.

--
Gavin Burnell
Condensed Matter Physics Group, University of Leeds, UK
http://www.stoner.leeds.ac.uk/
0 Kudos
Message 5 of 10
(4,256 Views)

Hi Gavin

 

I have just added the controls to my system pallet and tried this out, I am using LabVIEW 8.6. I do see the same issue but as yet am not able to pinpoint when it occurs. I placed down one system control and kept replacing it with different ones. After changing the control about 8 times I saw the issue. The control held the label for error out even though I changed the control to a boolean and then a numeric.

 

I then placed down a second system control on the same front panel and I haven't been able to see the same issue. I have changed the control about 15 times now and the label still holds the correct value each time.

 

I am not seeing a different control appearing to the one I select, I just see that the name of the control does not change. Are you seeing both issues on the same front panel?

 

Have you seen this issue with multiple system controls on the same front panel or is it just the first one? I am going to try this again to see in I can pinpoint when this issue occurs.

 

Thanks

Beejal S
NI UK & Ireland
0 Kudos
Message 6 of 10
(4,221 Views)

Hello,

 

This is my observation of the weirdness using LabVIEW 8.6.1:

 

weirdness.PNG

 

I shall investigate more!

0 Kudos
Message 7 of 10
(4,169 Views)
Solution
Accepted by gb119

Hello,

 

I found a workaround. After inserting my custom control, I had an edit palette view that looked like this:

 

weirdness2.PNG

 

I then rearranged it, and deleted any empty rows/slots:

 

weirdness3.PNG

 

 

And it works as normal. Please could you try this yourself?

 

I hope this helps!

Message 8 of 10
(4,163 Views)

Hello,

 

You might also be interested to know that I haven't been able to replicate this in LabVIEW 2009 so it may be fixed in 2009.

0 Kudos
Message 9 of 10
(4,158 Views)
Yup - deleting the empty slots in the palette file (apart from the ones at the end of the palette) fixes the problem. Pity that one can't lay outr the palette freely, but it's less annoying than having the wrong controls added to the panel :manwink:
--
Gavin Burnell
Condensed Matter Physics Group, University of Leeds, UK
http://www.stoner.leeds.ac.uk/
0 Kudos
Message 10 of 10
(4,144 Views)