09-01-2021 03:12 PM
Greeting!
I'm using a NI-9411 on an CRIO-9045 to read rotation signal from an encoder. The version of my software are : LabVIEW 2020, NI-DAQmx 20.0. LabVIEW Real-Time 20.0.
I can see the NI-9411 module on MAX and I can run the test panel of NI-9411. All works fine.
The problem happens when I turn into programming in my LabVIEW. I want to use NI-DAQmx to read counter channel of NI-9411, But the physical channels show EMPTY, no channel shows up.
Does anyone know how to solve this problem? Many thanks
best
09-01-2021 03:16 PM
On which system do you try to run your DAQmx code? On your Windows host? Or on the cRIO-target.
You have to run your VIs on the compactRIO for that !
Regards, Jens
09-01-2021 03:16 PM
Attach the VI you've put together so far.
Saying "Thanks that fixed it" or "Thanks that answers my question" and not giving a Kudo or Marked Solution, is like telling your waiter they did a great job and not leaving a tip. Please, tip your waiters.
09-02-2021 11:41 AM
Hi Jen,
Thanks for your reply. I have attached a figure of the project. I added the VI under my real-time target CRIO-9045. When I open that VI for programing, I can not see the channel.
09-02-2021 02:18 PM
@ZhenhuanZhang wrote:
I have attached a figure of the project. I added the VI under my real-time target CRIO-9045. When I open that VI for programing, I can not see the channel.
You can see the Channel in MAX. You cannot see the channel in the "VI under my real-time target CRIO-9045". This suggests (to me) that your VI is the problem. You failed to attach your VI, and it seems silly for me to try to "guess" what you did or didn't do in your code.
Please attach your VI (or VIs, or, best, the entire Project, compressed into a single .zip file). That makes it much easier for us to see if there is a problem in your code.
Bob Schor
09-08-2021 10:35 AM
I did not see the channel in my MAX last time, I only see my module NI9411 there.
I found a possible reason. In the last time, I did not create a channel in MAX. I thought if I can see my module 9411 in the MAX, then I can just read it with functions in my VI. But I think I'm wrong on that. Today, I right clicked the NI9411 and chose " Create a task", Then I can see one channel appeared in tab of " Data neighborhood" . Now if I add DAQ-Assistant in my VI, I can see the corresponding channel. So I learn that I have to create a channel first, am I right?
09-08-2021 11:56 AM
So you're using DAQ Assistant?
NO - do not use DAQ Assistant, use the DAQmx drivers instead.
09-08-2021 01:50 PM
The Dreaded DAQ Assistant (DDA) is an extremely limited tool that can handle the most simple Data Acquisition Tasks. It is built "on top of" DAQmx, an excellent (and easy-to-use) set of utilities that NI introduced about 15 years ago. NI has an excellent set of DAQmx Tutorials and videos that you can find by searching the Web. My favorite one is "Learn 10 Functions in NI DAQmx and Handle 80 Percent of Your Data Acquisition Applications". But I suggest you find the other lessons in the DAQmx series and learn DAQmx.
Bob Schor