06-13-2008 12:00 PM
06-20-2008 04:29 AM - last edited on 01-31-2024 11:56 AM by migration-bot
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,
06-23-2008 12:41 AM
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
06-27-2008 03:41 AM
07-04-2008 02:31 AM
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
07-04-2008 06:22 AM - last edited on 01-31-2024 12:00 PM by migration-bot
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.
07-06-2008 09:31 AM
07-08-2008 03:16 AM