LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW, Synchronous measurement in cDAQ chassis

Solved!
Go to solution

Hi all,

 

i wanted to aquire analog and digital signals from a NI 9174 cDAQ Chassis. There is one NI 9215 device for analog measurement and three NI 9401 for checking the over all 24 digital inputs. Now, i want to sample one analog channel and all digital lines synchronous.

Only one NI9401 for digital and the analog card is not a problem, when configure the analog sample clock as sample clock source for digital in (picture).

NI9174_01.PNG

The problem is to have multiple NI9401 synchronized. I thought , I could change the channel name and extend the range, e.g. like this

"cDAQ1Mod2/port0/line0:7, cDAQ1Mod3/port0/line0:7"

but this creates an error message. Some other ideas, for example to use the DAQmx control task.vi and make the task 'reserved', didn't work.

 

I know, it is possible to use a counter and create an own clock signal and provide it to the other NI9401 devices, but I don't want to renounce some digital inputs.

 

I'm using LabVIEW 2013 (2017 is ordered and on the way)

Thank you for your answers.

 

 

0 Kudos
Message 1 of 11
(3,997 Views)

I put together a test VI (see snippet below), and I do not see error. However, I only created simulated cDAQ modules in MAX, so this might causes differences...

Did you use the "Browse..." option at the "lines" input for that DAQmx Create Channel (Digital input).vi to select the desired 24 lines of the 3 modules?

 

What is the error msg you get?

 

Can you share your VI? It is a bit difficult to "decode" German LabVIEW (by the way, do you have any special reason why you use German LabVIEW? It is just much easier to get help online if you show English VIs to people...also easier to find resources/white pages in English, and so makes your life easier when you need to compare block diagrams...)

 

triggering1_BD.png

 

0 Kudos
Message 2 of 11
(3,958 Views)

Thank you for your good advise. The test rig is running and I couldn't use the hardware at the moment. So I created a virtual cDAQ device as you did. I used the Browse.. option to select the modules and channels for the DAQ task. But whatever I choosed (hardware/virtual device) the error is the same: Error -200086. It says, that there is a syntax error in the string that defines the physical channel range.(image attached)

Maybe it is a problem using LV 2013?

And you are right: I should use the LabVIEW English version. The german support in the community/internet is very poor. I just used the german version, because I was more comfortable for me.

 

 

0 Kudos
Message 3 of 11
(3,941 Views)

Well, LV 2013 is really outdated, but I have no idea if this was an old bug, or not?

Anyway, you will be much happier with LV 2017! 🙂

You said, you ordered LV 2017. Are you aware that you can download LV, and start to use it right away in evaluation mode? http://www.ni.com/download/labview-development-system-2017/6679/en/

If you got a serial key already, you can use it during the install, or you can activate your product later.

 

So I suggest to install LV2017 right now, and test my snippet (or yours). Also attach your VI to the post so others can have a look and test it.

0 Kudos
Message 4 of 11
(3,937 Views)

Hi kaba,

 

Error -200086. It says, that there is a syntax error in the string that defines the physical channel range.(image attached)

It's invalid because the string contains several "devices" (aka modules, "mehrere Geräte im String").

Have you tried to create a seperate task for each module?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 5 of 11
(3,934 Views)

@GerdW wrote:

Hi kaba,

 

Error -200086. It says, that there is a syntax error in the string that defines the physical channel range.(image attached)

It's invalid because the string contains several "devices" (aka modules, "mehrere Geräte im String").

Have you tried to create a seperate task for each module?


Then how do you explain that my LV2017 snippet does not create any error? I can just specify all 3 modules in one step, see my snippet.

Was this a kind of limitation/bug in LV2013?

0 Kudos
Message 6 of 11
(3,932 Views)

Update:

 

I installed LV 2017 eval to check if it is an 2013 specific error. The result is the same error!

NI9174_03.PNG

Is it really not possible to have multipe cDAQ modules in one string / task ?? I thought I read about that.

 

@ Blokk : I attached a very simple VI. Could you please check if it is running or creates an error?

@ GerdW : Of course I tried to create  more than one task, but there were other issues. I will get back to it in detail when the cDaq chassis is back on my desk. I hope at the end of the week. For now, I have to use the simulation.

 

Thanks...Smiley Happy

 

0 Kudos
Message 7 of 11
(3,923 Views)

You should be able to use a single DAQmx task for different modules, until they are in the same chassis. I have some thermocouple modules, and they work fine when i specify them for a single task.

 

I have no idea what is wrong in your case. That error message you see should only appear if you tried to use different chassis for the same task. But you have a single chassis, so this error just does not make sense to me.

 

I can test your VI later on when i get home, right now i am from a smart phone...

0 Kudos
Message 8 of 11
(3,916 Views)

How about adding each port to your task inside a for-loop:

grafik.png

Regards, Jens

Kudos are welcome...
0 Kudos
Message 9 of 11
(3,908 Views)
Solution
Accepted by topic author kaba2005

Ok, I have found the problem. Actually the error msg is not really useful, that is why it took some time 🙂

So it looks like, you must use the "one channel for each line" parameter for the "line grouping" input of the DAQmx Create Channel (DI - Digital Input).vi. If you use the "one channel for all lines" setting, you get error. I guess the reason is that, you cannot group together lines into one channel over several modules.

 

If you need to use the "one channel for all lines" setting, just do what the previous poster suggested.

Examples for both ways:

 

multiplecDAQd_BD.png

0 Kudos
Message 10 of 11
(3,899 Views)