Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

Alternative to PCI-6023E + PCI-6602

Hello,
I am already using a system to acquire 16 analog inputs data (at 50Hz) and 100Hz PWM signals (counters) and to send 100Hz PWM signals to external devices. Because it deals with 12 concurrent counters I bought 2 x PCI-6602 counter boards on top of a PCI-6023E for the 16 analog inputs (through a SC2345 box). This works all well.
I now have to build a simplified and portable solution that has to run on a laptop. I was thinking about a DAQ-6036E or DAQ-6024E (or even DAQ-6062E) and keep a SC2345 but do not know if I will get the same functionalities particularly for the PWM counting (in and out). I have to be able to count the high edge of the square signal at 100Hz while acquiring my analog inputs; also be able to generate those 100Hz signals. Will I be able to connect my counter in and counter out (one of each) to the SC2345 to do that?
Thanks for your comments,
Christophe

0 Kudos
Message 1 of 8
(5,306 Views)

Hello Christ0phe,


Looking at your current specifications and hardware, the best suitable solution for a portable appication with >2 counters would be the Compact RIO Platform.
As this is an FPGA based platform, you can implement (theoretically) as much counters for PWM generation and reading as you want.
As you are an existing DAQ user, you will not be able to reuse your existing code.  The cRIO platform uses the NI-RIO driver which is using some different program logic than the NI-DAQmx driver.
Why is the Compact RIO platform the best solution?
Well, the cRIO chassis can be powered by a simply DC power supply. Depending which chassis this is between 9 and 30 VDC.
The cRIO platform also has a dedicated controller inside which will run your LabVIEW code.  The PWM logic itself can run on the FPGA integrated in the cRIO chassis.
So, the laptop will not be use for any calculation, only for monitoring and control of your application.


If you want to stay with the NI DAQ plaform I see two other portable solutions:

The first one is to make the swtich to the PXI platform.
There is a small chassis (PXI-1033) which has an integrated MXI-interface. Using MXI technology, you can control a PXI chassis from another PC, including a laptop (using ExpressCard, not PCMCIA).
For the PXI platform you can use identical or similar DAQ boards as you have now, reusing your existing LabVIEW code.
Drawback of the PXI-1033 is that it can only be powered by 230VAC, you will have to provide a DC-to 230VAC converter yourself to be able to use it in the field.

For your information. It's becoming harder and harder to find laptops with PCMCIA slots, ExpressCard is the successor available on most new laptops.


A last solution is to use the cDAQ plaform.
Again a fully portable DAQ solution, but as it uses the same technology as the 'normal' DAQ boards, it only has 2 counters on board.
As your PWM speeds are quite slow, it may although be possible to use this platform for multiple PWM signal generation and reading.  All will depend on the desired PWM accuracy (resolution) and if they all share the same signal period.
It is possible to use the 2 on-board counters as a known sample clock to generate and read the PWM pulses using correlated DIO.
Correlated DIO means that your digital input and output signals are hardware clocked (synchronized with other available clock source). On the cDAQ platform, your I/O modules must be placed in slot 1-4 of the cDAQ chassis to be able to use correlated DIO.  Possible I/O modules are in the C-series 940x range.
Drawback: all your calculations have to be done on the fly in LabVIEW.  You will need to write code to generate an array of digital waveform data, then output it using hardware timed DIO synchronized to generate counter clock.  For the readout of the PWM signal, you will have to count (within the LV application) the number of tick (of pulses) of the sample clock during which the PWM signal was 'high' and calculate based on the known timing information the PWM on-time, period (and if needed duty cycle). 

More info about cDAQ and Correlated DIO:
NI-DAQmx: Correlated Digital I/O with NI CompactDAQ and LabVIEW
CompactDAQ - Generating More Than 2 Pulse Trains
NI-DAQmx: Digital Channel Pulse Width Modulation (PWM)


This info should already help you make a selection.
But please contact you local National Instruments office if you need more information.


Best regards,

 
Best regards,
Joeri

National Instruments
Servicesg
http://www.ni.com/ask

Make our forums great:
If you like the answer, don't forget to "Kudos!".
"Accept the Solution" if your question is answered!
Message 2 of 8
(5,267 Views)

Hello and thank you for your detailed answer,

I have gone through the cDAQ platform solution that you proposed and have installed a 9474 Dout module in a 9172 chassis. Now what I do not really understand is what you say about the programming needed to achieve Dout counters. If I look at your example called 9401_four_pulse_trains_gen[1].vi it apparently uses the hardware trigger from the chassis clock and DAQmx and feeding. Is it possible to directly use the Counter Output for PWM generation instead of the Digital Output (lower part of the diagram)?
Otherwise I read somewhere that I could use FPGA to upload the code into the 9474 Hardware, is it something you would consider at this stage? I never used it but have got a licence and what I need to do is just to generate a serie of PWM output, so very basic things...

My goal is really to mimic what I have done with the PCI-6602 which means outputting duty cycles at 100Hz with an accuracy of 0.1%, which is not that much I guess. Only 2 counter outputs will be used.

In the Labview examples shipped there is also this Vi "PWM-Counter Output.vi" but I do not know if I can use it with my hardware.

Thanks again for your good support,

Christ0phe

0 Kudos
Message 3 of 8
(5,239 Views)
Hello Christ0phe,


The Compact DAQ platform uses the same technology as the M-series DAQ boards of NI.
This means, you have 2 counters available.
It's always best to generate PWM signals using a counter, so with one cDAQ chassis, you can generate 2 PWM signals.

The proposition to use the counter(s) as a clock signal is a more complex solution when you
want to generate more then 2 PWM signals using one cDAQ chassis.  The counters are very flexible "tools" so you are able to generate a precise  clock signal, of which the frequency is known, and distribute it internally (routing) within the cDAQ chassis.  Based on the known clock frequency you can generate the PWM pulses and read them. In this case it's all done in the software.

With the FPGA solutions we are refering to the Compact RIO (cRIO) platform.  This is not the same as Compact DAQ.
This is a chassis with an integrated FPGA.  The cRIO platform accepts the same I/O modules as used in the cDAQ chassis.  Actually all C-series modules are compatible with the cRIO platform, not all with the cDAQ platform.  

The 9474 C-series module your are refering too is simply a digital out module.  This module can generate pulses with a 1µs precision.  For more precision I recommend you to look at the C-series 9401 and 9402 which have nanosecond precision.

But with the C-series modules alone you cannot do much. It's simply the signal converter and conditioning between the cDAQ chassis and the physical world. Something needs to drive these module.  That's where you need the cRIO chassis with the integrated FPGA and Real-Time Controller. (http://www.ni.com/compactrio/)
If you need to read and generate more than 2 PWM pulses, I can only recommend this solution.

Your LabVIEW code will be written into the FPGA, which is actually hardware.  So high precision and uptime garanteed.  The real-time controller will and can be used for more complex calculations if needed and for communication with the host computer so you can change parameters if needed. For the portable solution the host will probably be a laptop computer.
To program the cRIO chassis, you need the LabVIEW license, LabVIEW Real-Time and LabVIEW FPGA module, but I understood you have this software available.

So if more than 2 PWM's needed, have certainly a look a the cRIO (FPGA) solution.
LabVIEW FPGA programming (NI-RIO driver) is a little different then NI-DAQmx programming.  But LabVIEW is doing most of the work for you.

To answer you last question:  Yes, you can use the
"PWM-Counter Output.vi" example with your cDAQ chassis. cDAQ uses the same driver (NI-DAQmx) as the other DAQ boards, just reference to your cDAQ device.  Again, the cDAQ has only two counters available.
I simulated this by creating a Simulated cDAQ chassis with modules in MAX. 
Remember that you will have to place you C-series digital output modules in slot 5 or 6 to have physical access to the counters of the cDAQ chassis.


Best regards,
Joeri

National Instruments
Servicesg
http://www.ni.com/ask

Make our forums great:
If you like the answer, don't forget to "Kudos!".
"Accept the Solution" if your question is answered!
Message 4 of 8
(5,197 Views)

Hello and thank you very much for your very valuable input,

My cDAQ based system is up and running with 9474, 9203 and 9219 modules.

I remain with two open issues:

- it looks like the 9203, 8 x 4-20mA inputs, will only accept common COM for the signal inputs. In my case the fact that I connect all my grounds to COM create an unacceptable electrical noise. I was wondering if like voltage input modules, a kind of differential mode might be used with this module or I would need another reference to achieve this isolation between input signals?

- the nice thing with the 9474 is that my 2 counters output PWM signals at the voltage supplied to the module. In my case it can be 3.3V, TTL or 14V. In my other application where I use PCI-6602 boards I cannot achieve this, the PCI-6602 output in TTL. Nevertheless I also have E-serie or MIO DAQ cards with the 6602. If only 2 counters are needed, how do I have to wire the counters from the E-serie board if I run through a SC2345? I have seen that TTL and 15V are available on the SC2345 but do not know how to wire my counter out signals?

Thanks,
Christophe

0 Kudos
Message 5 of 8
(5,135 Views)

Hello Christ0phe,


You are completely right.  The C-series 9203 has one common ground which can cause ground loops.
An alternative can be the 9219. This is an isolated 24-bit general purpose input module.  Also the ground as an isolation barrier which will prevent ground loops.
It's a 24-bit resolution DAQ device. High precision, but sample rate is limited to 100 S/s/channel.

Alternatively you can use an isolated analog voltage input module and add a precision 249 ohm (1% tolerance) resistor over each differential input.
The 249 ohm resister will convert the 4-20mA into 1-5 Volts signals.
Examples are 9229 and 9239.

Some additional resources:
Current Measurements: How-To Guide
How to Build a Current Loop System


Concerning the SC-2345:
The counters of your DAQ board are available only at sockets J19 and J20.
To use flexible voltage (meaning 5-48 VDC) for the counters you need the SCC module SCC-CTR01. This will give you the isolation barrier.
The manual can be found here and describes the pin assigments of the module in relation to the DAQ board channels.


 
Best regards,
Joeri

National Instruments
Servicesg
http://www.ni.com/ask

Make our forums great:
If you like the answer, don't forget to "Kudos!".
"Accept the Solution" if your question is answered!
0 Kudos
Message 6 of 8
(5,129 Views)
Hello,
Strange that there is no 8 x 4-20mA module with isolated inputs... But ok I understand your alternatives.
As to the need to use the CTR01 I do not see what I gain vs using the pins 2 and 36 of the SC-2345 terminal block as a counter out to produce my PWM (it is connected to an E-serie 6023E card). Do I get a TTL between 2 and 36 or just a contact?
Can I also use the +5V or +15V of my SC-2345 (I use PWR02 option) to send out a PWM in 5V or 15V? I have a 20mA load behind that. Do I get these 5V and 15V voltages from the J25?

Thanks for your precisions,
Christ0phe
0 Kudos
Message 7 of 8
(5,095 Views)
Hallo Christ0phe,


I can understand that you would like to have an 8 channel 0-20mA module.
Although not available today, the C-series modules range is a continuous evolving range with new modules every month.
Don't be surprised that one day an 8 channel 0-20mA modules comes available.
Anyhow, I will provide this feedback to the DAQ R&D guys.

Back to the SC-2345.
SCC simply adds an isolation barrier to you DAQ channels. Advantages: you can handle higher voltages and you are isolated from ground (preventing ground loops).
So also for the SCC-CTR01. If you only want to generate TTL PWM signals, than no need for the SCC-CTR01. The counter/timer connections are also available on terminal rows A-C.  If you desire PWM signals of 15V, than the SCC-CTR01 is unavoidable.
You can use the +15 VDC coming from the PS2 power supply as long as you stay within it's power limitations. Voltages of +15VDC, -15VDC and 5 VDC are available on J21, J25 and on every socket of the SCC modules.  Bracing on the sockets itself isn't the nicest solution if you ask me, but using a split cable you can take the power from J25.
The SCC-CTR01 module itself can handle up to 800mA.
Reference: SC-2345 manual: http://digital.ni.com/manuals.nsf/websearch/977C8687049A4E7F8625730800636F9B

Best regards,
Best regards,
Joeri

National Instruments
Servicesg
http://www.ni.com/ask

Make our forums great:
If you like the answer, don't forget to "Kudos!".
"Accept the Solution" if your question is answered!
0 Kudos
Message 8 of 8
(5,077 Views)