UI Interest Group Blog

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Coolest cDAQ demo ever?

Member

Hi all,

I have been building this cool UI demo for cDAQ systems. It's not 100% ready but I think I can release the source code and the idea for you guys. I always like to share my code...

What is it?

Just a cool cDAQ User Interface demo. With this demo you can configure your measurements with cool UI. The configuration part can detect current system even if you add/remove modules during runtime. The UI will change according to current system. Which is pretty cool (specially with real HW). Also the measurement part has a cool UI (iPAD look and “touch screen like” scrolling effect).

Why I made this demo?

With LabVIEW it’s pretty easy to build something like this. So this is just an example how to create cool UI with LabVIEW.

How to demo?

There are multiple ways to demo this SW but I like to do it this way.

1.) Open MAX

Make sure you don’t have cDAQ devices or any other device on MAX under Devices and Interfaces:

pic1.png

2.) Launch “cDAQ - UI - Main.vi”

It should launch and you will see this screen:

 
pic2.png
 

3.) Create simulated NI 9178 Chassis with MAX


Goto MAX (resize and move it to next to the LV screen) and create new simulated NI 9178 chassis:

First select “Create New…”:

pic3.png

Then select “Simulated NI-DAQmx Device or Modular Instrument”:

pic4.png

And Select “NI cDAQ-9178”:

 

pic5.png

 

Now the LabVIEW UI will detect the Chassis:

pic6.png

4.) Add modules to the Chassis:

Right click the Chassis in MAX and select “Configure Simulated cDAQ Chassis…”:

pic7.png

Add these modules:

  pic8.png
 

The SW should now discover those modules (you can delete/add modules and it should discover those automatically):

pic9.png

Mouse Over those modules and you will see a description of the module:

pic10.png

Then select “Testpanel Mode”:

pic11.png

Now click one of those modules and it will open the Test Panel Close the Test Panel…


 

Uncheck the Testpanel Mode and click the module and it will then open the configuration window. Use the defaults and just select OK (do it for all of those 4 modules):

pic12.png

After you have done all four configurations Click the “Ready” button:

pic13.png

And it will then launch the iPAD screen with measurement VIs running (Scroll Left or Right by using your Right mouse button):

pic14.png 
 

If you now remove for example the first module (or whole system) from the MAX then this will show up:

pic15.png

Put the module back and hit the “Start Again” button and the code should continue measurements.

If you use this SW in a tradeshow etc then you can use the hidden feature to automatically change the measurement screen within 5 seconds. Try to find the small hidden “Radio button” from the upper right corner (just click with your left mouse button all over there):

pic16.png

When you find it and click it on it should look like this:

pic17.png 
 

Can I use it with Real HW too?

Yeah you can use this code with real HW too But please use with these HW only:

Chassis types: NI cDAQ-9171, NI cDAQ-9172, NI cDAQ-9174 or NI cDAQ-9178

Module types: NI 9211, NI 9215, NI 9219, NI 9234, NI 9263 and NI 9472.

You may add more modules if you create new settings and measurement VIs here: …\Dynamic “Loading\Settings and …”\Dynamic Loading\MeasUIs

Enjoy!

Questions? Please let me know

TODO:

  • Support for NI cDAQ-9181 and NI cDAQ-9188 
  • Support more Modules
  • Better recovery from Error

Br,

Samuli

UPDATE: Added support for NI cDAQ-9171 chassis ;-)

Style is Everything
Comments
NI Employee

Very nice job Samuli =)... cool.

NI Employee

Great job Samuli. I noticed a bug when I have more than one chassis configured in MAX the UI crashes. Thanks and have a great day. 

Member

Yeah it will only support one chassis That feature can be easily added to the initialization part (just check how many devices are online and then ask user to select one of them and then use that "device id" etc).

Style is Everything
Member

How hard would it be to make this work with cRIO?

Member

Little bit harder but NI has some ready functions that you could use. I will post a link later...

Br,

Samuli

Style is Everything
Member

Here you go Roy,

Reference Library for Reading cRIO System Configuration Information (CRI)

http://zone.ni.com/devzone/cda/epd/p/id/1717

Br,

Samuli

Style is Everything
NI Employee

Great work!

Member

Hi Samuli,

Can you please update about cDAQ 9171 because i am doing a project in which we need to fetch the data from quadrature encoder. I got the output but it keep on increasing in angle. whether i need to do small program or i need to change in proporities.

With regards,

Zhenzhu.

Member

Hi Zhenzhu,

I updated sw to support NI cDAQ-9171 Enjoy!

BTW I have also a version where the SW is controlled with iPhone/iPad (measurement part) That one I will publish little bit later but if someone wants to have it sooner then come to NIWeek and try to find me there

Br,

Samuli

Style is Everything
Member

Thanks samuli..  But i could not able find it..  I am sorry can please help me ???

With Regards,

zhenzhu

Proven Zealot

Hi Samuli,

I am AE from ASEAN, we are interesting in this demo.

However, I have found some bug, sometime module cannot be detected by program,especially if I add one module later in MAX.

I need to remove all whole chassis in MAX and re-simulate again in MAX.

Do you have any idea what's possible root cause?

If I would to modify code in order to support more module types, how difficult would it be to edit code.

Regeads,

Chomphunut N.

Applications Engineer | National Instruments
Singapore (65) 6226 5886 | Malaysia (60) 3 7948 2000 | Thailand (66) 2 298 4800
Philippines (63) 2 659 1722 | Vietnam (84) 28 3911 3150 | Indonesia (62) 21 2783 2355