From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CompactRIO Variable and IO Naming Channel Order Bug

Solved!
Go to solution

Hi all,

 

I have found a bug related to named IO's and the illogical way of accessing them using fast array based methods. It creates a lot of work-around hackery & trickery to mitigate. Fixing this bug would be most appreciated from a code saneness and maintenance perspective.

 

Deployment looks like this(observe the scaling indicated in the name):

DploymentOrder.JPG

 

Running the code (with beforehand mentioned scaling) yields:'

ReversedAndInvertedOrdering.JPG

 

This is a bit too strange for engineers used to the normal workings for example in the world class top notch implementation DAQmx of array based IO access.

 

Attached is the project source.

 

Br,

 

/Roger

 

0 Kudos
Message 1 of 10
(4,335 Views)

Hello,

 

Using LabVIEW 2012 with the Real-Time Module and NI-RIO 12.0 when I rename input channels in your project they stay ordered according to the channel number (the same incorrect behavior as you are seeing).

 

When I add another target and rename channels they order according to the Children[] Array that your project saw (not according to which input channel it was):

ProjectOrder.PNG'

 

Thus it appears that new targets behave correctly. 


What version of NI-RIO do you have installed? I assume you are using LabVIEW 2011 based on your ZIP file.

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 2 of 10
(4,194 Views)

Hi Craig.

 

Right-click the "Mod1" device, select "Arrange by" -> "Custom ordering", then reorder the channels so that the named channels are arranged by physical channel index/order and see if you get the same issue?

 

Br,

 

/Roger

 

0 Kudos
Message 3 of 10
(4,188 Views)

Hi Roger,

 

I seem unable to change the order of the list by changing the arrange by option to custom, is there a special method you are using to do this?

 

Changing the options on your list to arrange by name orders it alphabetically.

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 4 of 10
(4,179 Views)

@Craig_ wrote:

Hi Roger,

 

I seem unable to change the order of the list by changing the arrange by option to custom, is there a special method you are using to do this?

 

Changing the options on your list to arrange by name orders it alphabetically.


Ah, yes, my mistake, correct procedure below:

 

First set the "Mod1" to "Arrange by" -> "Custom" and then rename your channels to whatever makes sense.

 

Then you should perhaps be able to reproduce the channel order obfuscation?

 

Br,

 

/Roger

 

0 Kudos
Message 5 of 10
(4,176 Views)

Hi Roger,

 

Thanks for the information. The Children[] output is always listing channels alphabetically no matter what the ordering is in the project so this confirms what you are seeing. I am currently looking into if this is expected behaviour and if not I will be filing a CAR on the topic.

 

You initially compared this to DAQmx, do you have a convenient comparison point from it?

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 6 of 10
(4,168 Views)

@Craig_ wrote:

Hi Roger,

 

Thanks for the information. The Children[] output is always listing channels alphabetically no matter what the ordering is in the project so this confirms what you are seeing. I am currently looking into if this is expected behaviour and if not I will be filing a CAR on the topic.

 

You initially compared this to DAQmx, do you have a convenient comparison point from it?


DAQmx is a top notch daq abstraction driver framework.

I seldom get any "surprises" of obfuscated oddness there.

Not sure if that would be a good point of reference, though. Smiley LOL

 

However, merging the good networkeability and simplicity of shared variables with the power of DAQmx would for sure be fantastic. For example with device specific default DAQmx FPGA personalities with most common funtionality in terms of calibration, fifo's, scaling, trig, etc.. that is common to DAQmx.

0 Kudos
Message 7 of 10
(4,162 Views)

Any news on this issue, is it a bug or a "feature"?

 

Br,

 

/Roger

 

0 Kudos
Message 8 of 10
(4,091 Views)
Solution

Hey Roger,

 

Sorry for not following up with you on this issue previously.

 

In discussions with my colleagues at the time I think we determined that it was expected behaviour and that is was the LabVIEW project's naming order which was wierd.

 

At any rate I looked back at this today and ended up filing CAR 401856 on it for the sake of documenting this.

 

Treat it as a feature for now 🙂

 

Regards,

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
Message 9 of 10
(4,064 Views)

Hey Roger,

 

It is officially a feature!

 

Regards,

Craig H. | CLA CTA CLED | Applications Engineer | NI Employee 2012-2023
0 Kudos
Message 10 of 10
(4,041 Views)