LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple modules with analog input, digital input, and digital output using cDAQ 9189

Hi, I'm a first time LabVIEW and DAQ user. I was wondering what good references there are or starting point for using a cDAQ 9189 and 7 modules, with various channels to be monitored. My biggest concern is how to get timing synchronized, and have no place to start. Is there anything like this where you can just change parameters like sampling rate, channel, etc.? I looked at examples, but it's not for synchronization of modules within chassis, how do the clocks work and what time reference do I use?

0 Kudos
Message 1 of 10
(1,242 Views)

Signal-based Synchronization of Analog Input C Series Modules with NI-DAQmx in LabVIEW is a good start.

-------------------------------------------------------
Control Lead | Intelline Inc
0 Kudos
Message 2 of 10
(1,220 Views)

Is there any information on how to use the input information to control digital output? The logged information from digital input and analog input will have to automatically change the digital outputs

0 Kudos
Message 3 of 10
(1,144 Views)

You're expected to implement it. Since it is a cDAQ, there will be delay in responding to an event in your analog/digital input and responding in your digital output.

 

What are you trying to achieve, any sort of control system?

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 4 of 10
(1,136 Views)

Okay, I am new to DAQ units, LabVIEW, and this sort of control, and everything starts at assuming you already know all about this stuff it seems. It is a control system, which will be monitoring multiple voltages, as well as contactor statuses, and depending on if any voltages/currents go outside expected value, or if the contactor status of something changes, there is an output signal given to some of the relays or other contactors that will cut power to components or reset the generator. Because it uses multiple analog and digital input modules, as well as digital output modules, and all information will have to be monitored and synchronized, I was wondering if there was some basic examples with a cDAQ and this sort of setup. It seems generic, but when looking for examples and references, I have not found information that talks about putting it all together. My main concern when combining separate aspects, is not having a fast enough response time or the information is logged to a TDMS and is out of sync. Any help would be great, thank you!

0 Kudos
Message 5 of 10
(1,128 Views)

by "fast enough response time", if you mean something in the lines of few ms, it is tricky with cDAQ.

 

Typically, you can develop something that continuously reads inputs in 100ms chunks of data, your decision logic determines the output, then sets the output. So, based on the implementation, your response time from something happening at the input and doing something based on that input could reliably be in the few hundreds of ms with a cDAQ.

 

Tell us more about the inputs, what kind of decision making, how often, criticality of responding to the event (what happens if it fails to respond)?

 

Note, cDAQ is no different from other DAQmx devices in terms of software development. There are abundant DAQmx examples available.

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000004B6mSAE

 

Note: Any software running on Windows can hang or crash, think through how that impacts your control system.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 6 of 10
(1,125 Views)

Some questions I'm running into, is for time-based synchronization, and all modules having different parameters (ex. NI 9229, NI 9375, NI 9205) all on the cDAQ9189, how to configure that? How to make sure all following same clock? The goal is trying to get it as fast as possible, with inputs being voltages in the range of 0-30V (some of these will correspond with the related current) and some temperature readings. I guess just a place to start, if at least 100 Hz sampling, and then some of the channels can be run in a loop within this, to make it faster? I'm not sure on the handicaps that come from the software without making it too complex.

0 Kudos
Message 7 of 10
(1,115 Views)

Channel Expansion is the easiest way to synchronize DAQmx channels.

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000P8XiSAK&l=en-US

 

If you're interested, learn more on synchronization here - https://www.ni.com/en/support/documentation/supplemental/06/timing-and-synchronization-features-of-n...

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
Message 8 of 10
(1,110 Views)

I've been looking through all the articles, but they sometimes lead to other questions. For timing, am I able to set up a sample clock for each module (analog and digital inputs and outputs) and have the same sample clock source? Is the ai/SampleClock good? I haven't quite figured out what each of the different clocks mean, and if I can use the same one for everything. I keep seeing "cDAQ synchronization is automatic", but how do I make sure that if each one is running different sampling rates, that they are all synced? Or is there a way to connect them all to the same sample clock, but still be able to monitor each one separately? I don't want to feed all the tasks in one sample clock, and then it be a mess to call each channel when look at a graph. Also, do you know any examples on how to use information gathered from an analog input (like if current goes to high) that it triggers a change in the digital output? 

0 Kudos
Message 9 of 10
(1,074 Views)

To avoid all the confusion, use Channel Expansion and DAQmx will take care of synchronizing them and use a Sampling Clock rate that is supported by all modules.

 

Create a single task for all your analog inputs using channel expansion technique and create a separate task for DO.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 10 of 10
(1,071 Views)