LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating arbitrary pin order on PXIE-6363 DAQ DO

Solved!
Go to solution

Did you Notice that the generated code is sorted on channel name and not channel order?

 

Nifty but not perfect.

 

At the very least though, we have exactly spelled array constants we can "Cluster sort" and feed into the config loop.

 

Or, just use the task! And !@$@ the code.

 

 


"Should be" isn't "Is" -Jay
0 Kudos
Message 11 of 16
(787 Views)

@JÞB wrote:

...

Config:

Config.png

Looking like Ben suggested ...


So we only need the original poster to confirm the channels are in the order they desired to confirm what I had suggested.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 12 of 16
(782 Views)

Yeah,

 

I might just mention that "Sorting" Feature in the code generation framework elsewhere.  The Task itself is correct.  Its just the generate configuration code that has this feature.

 

Now, looking through the original post.....

He did ask for an "Arbitrary" order.  What could be more arbitrary than an order sorted on channel names?


"Should be" isn't "Is" -Jay
0 Kudos
Message 13 of 16
(776 Views)

@Kevin_Price wrote:

Agreed, that's a pretty nifty config wizard NI has provided!  

 

...


Yes it is. Any time I am looking at a new set of DAQ interfaces, I use that approach to figure out which options I need to configure the new channel type.

 

Now if we could only convince NI that the modular instruments need to support a similar functionality...

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 14 of 16
(769 Views)

Jeff's solution of creating a new Task using the NI MAX wizard works. The only "downside" is that the data has to be fed in as a Boolean array instead of just as 32-bit integers when using the simpler 0:31 or 31:0 configuration. This is however not a big problem and otherwise the solution works well.

 

Thank you all!

0 Kudos
Message 15 of 16
(766 Views)

 

So we only need the original poster to confirm the channels are in the order they desired to confirm what I had suggested.

It's starting to look good.  Took me some fiddling with DAQmx properties for channel names and the special NI names for waveform attributes, but at least now the digital waveform graph appears to honor the special channel order.  Seems very likely that the hardware will do the same.

 

Here's what I saw in MAX (I used only the lower 8 bits):

MAX remapped DO.png

The auto-generated code adds individual lines to the task as additional channels in the corresponding sequence - line0, line5, line2, line7, etc.    So far, so good.

 

 

Then I modified the auto-generated code to insert my own recognizable pattern in 1D U8 format.  This matches the OP's format except for fewer bits to deal with.  I chose to convert from uint to boolean array to get away from finicky bit manipulations, and I had to tweak the auto-code to query channel names *correctly* and embed them into the waveforms:

gen 1D dig wfms.png

 

 

I sent the 1D array of digital waveforms to a graph (and to a simulated device to verify absence of errors), and produced this:

Dig Wfms FP.png

...and Voila!  You guys were both right!  The pattern that was originally the MSB gets mapped to the last digital line to be configured in the task, line4.  And so on.

   Looks like I've been reflexively old-school about most DAQmx stuff for so long that I've missed out on some nice features and capabilities like the wizard Jeff walked us through.  Thanks for the education and nudge!

 

 

-Kevin P

 

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
Message 16 of 16
(760 Views)