Data Acquisition Idea Exchange

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

The request is for NI to prioritize development of VIs that allow integrators’ CAN data to be measured and stored in standardized formats.

 

While TDMS and XNET are decent tools, it’s lack of modern development and open compatibility in industry makes it somewhat difficult to deal with. NI could probably expand and service its user base if it supported XNET and MDF4 better.

 

Currently our process is as follows:

  1. LabView XNET data comes from the cRIO FPGA (eg. NI-9853) as an array of 6 U32s
    1. https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000PASzSAO&l=en-CA
  2. LabView XNET default data structure is the typdef ‘XNET Frame CAN.ctl’
    1. See XNET help ‘XNET Convert (Byte Array to Frame CAN).vi’
    2. There are obscure (near obsolete) VIs or the end user must write code to convert from 6 U32 to XNET Frame CAN on poor documentation.
  3. As an aside, there doesn’t seem to be a clean standardized way to store either of these structures in the TDMS files
    1. There is a way to configure a TDMS channel for CAN frame logging, but it is not easy for signal post processing because it is only one channel of frames.
    2. We believe a much better way would be something like this if we stuck with TDMS.

KineticsTestEng1_0-1747240261033.jpeg

 

However as to this feature request we have found that the industry standard MDF4 file format to be advantageous in most aspects. 

Our tests found that a 1 hour 1.1GB raw CAN frames and analog data TDMS file could be stored as a 200 MB file in the compact MDF4 file ! When the CANbus data was expanded into actual signals, the MDF4 file was 900 MB (still less than the raw TDMS). Further this MDF4 file loaded into FAMOS for review in ~1 sec !

We would prefer to output directly to MDF4 rather than having to script this conversion process.

    1. One key detail is the storage of raw CAN frames such that other industry tools (eg. MATLAB, FAMOS, PYTHON, MDFvalidator, ASAMmdf GUI) can natively interpret and process with various DBC files (the standard includes tools to extract CAN signals).
    2. Secondly with high channel counts of fast sample rates, the file size quickly becomes enormous. MDF4 allows excellent compactness, further compression, and usability of data (including but not limited to CAN).
    3. However, NI’s DataPlugin needs work as it fails to read much of the structure, properties and data of MDF4 files (as seen from ‘Data File Viewer.vi’ utility below). To unlock the true power of MDF4, the CAN frame has to be written correctly. Currently this is impossible.
    4. We were surprised that NI as an ASAM member had not fully supported the MDF4 format.
    5. KineticsTestEng1_1-1747240261034.pngLV vs. free ASAMmdf GUI KineticsTestEng1_2-1747240261040.jpeg
    6. Vector’s free MDFvalidator tool useful for seeing the file structure                    KineticsTestEng1_3-1747240261043.jpeg

       

APPENDIX: here are some links and resources to summarize importance of MDF4 file format.

    1. Link to the standard’s homepage ASAM MDF [asam.net]
    2. Link to the MDF4 format’s documentation asammdf "7.3.14" documentation [asammdf.readthedocs.io]
    3. Link to a founding company’s page Measurement Data Format MDF | Vector [vector.com]
    4. Link to NI MDF4 plugin showing features https://www.ni.com/pdf/manuals/asam-ev-dataplugin-mdf4-2023-q3.html (note that #10 ByteArray is not supported).
    5. Why MDF4 is Popular for Testing:

      • Efficient Storage: As a binary format, MDF4 allows for the efficient storage of large volumes of data, which is crucial in extensive testing scenarios.
      • Standardization: Being an ASAM (Association for Standardization of Automation and Measuring Systems) standard ensures interoperability between different tools and systems used in the industry.
      • Metadata Support: MDF4 allows for the inclusion of rich metadata, providing context and facilitating the interpretation of the raw measurement data. This includes information about the signals, units, and test conditions.
      • High Performance: The format is optimized for fast read and write access, which speeds up the analysis of large datasets.
      • Flexibility: MDF4 supports various data types and allows for extensions, making it adaptable to evolving testing needs.

 

I have a cDAQ-9185 with the 'advertised' TSN feature, yet I can't use it unless I buy LabView and the Ethernet IP Industrial Network Driver. If FlexLogger is for data acquisition, why is it not supporting the TSN features of the cDAQ-9185? I'm disappointed in the way NI advertised the TSN features of the cDAQ-9185 by the way the require all this additional software to be purchased to actually use it. If FlexLogger doesn't support TSN and OPC they should state it.

Just what the title says!

When I drop a DAQmx Task constant on my LabVIEW block diagram, I have the right-click menu option to Generate Code >>Configuration 

 

This scripts out a sub.vi that creates the Task by adding each channel with channel specific properties sequentially, one channel at a time, to repeated calls of DAQmx Configure Channel.vi.

 

I have a hard time saving that vi output!  I have not really learned how to name it properly without Using:  "BLEEP_BLEEP_BLEEP_Configuration_that_cannot_be BLEEPING_scaled.vi"

 

I believe that an autoindexing loop would be much nicer.

 

My grandmother thanks you for improving my manner of speach.

Current implementation is that FlexLogger ignores the default values as configured in the CAN database.

 

As a bonus, use the default value, max/min values for the control that points to a transmitted signal in the CAN database.

The current FlexLogger implementation requires you to connect DAQ output channels to input channels and an additional XNET port to log output CAN signals, which adds to the cost of the DAQ setup/limits the amount of DAQ/chassis.

Very annoying this isn't possible in FlexLogger (or VeriStand)

Why is there no way to determine Trigger Status in NI-Scope? 

 

No, "Acquisition Status" is NOT the same thing. As Acquisition Status only tells you if acquisition is complete. I suppose you could say if it's not complete then it is still waiting for trigger, but you could be wrong. Specially in the case of a slow acquisition (seconds/div).

 

Any modern DSO I have used had a VI to determine Trigger Status and would return several states.

 

Such as:

Stopped

Ready, Armed, or Waiting (pre-trigger acquisition complete, ready and waiting for trigger) 

Pre-trigger (pre-trigger acquisition in process)

Triggered (post trigger acquisition in progress)

 

当我使用网络流将数据从CRIO传输到PC时,程序正常运行几秒钟后,它提示我断开与CRIO终端的连接。此时FPGA的采样时间为1 uSec。当我将采样时间增加到大于 1 uSec 时,程序运行良好。也就是说,当程序的采样率低于1MS/S时,程序可以正常运行,当采样率等于1MS/S时,程序就会出错。是不是因为队列和网络流写得太慢了?请帮帮我,谢谢。

QQ图片20220412152952.png

I'd like to expose an opportunity to make FlexLogger easier to use around shunt calibration. With various internal shunt calibration resistors between different hardware, is there a way that the software would know the appropriate location and resistance value when performing a shunt calibration? It is tedious, and a possible point of error, having to manually enter, for example, the correct shunt resistor between using our 9236 cards and the strain based FieldDAQ units.

While using NI USB-6008/6009, I am encountering a strange error which I have failed to find the source of it. As you can see, there are 2 types of outputs. When I comment out one of the outputs, other one works fine. However, when I use them both, it gives me an error as shown below in the picture. What could be the problem?
Error : Invalid data format for digital channel
However, error direct to analog output.Error.JPG

There's no option to cancel changes made to a channel in FlexLogger. If I edit or change a series of parameters, but want to revert to the previous settings, there is no option to do so. I then need to re-enter what was there (and hope I don't forget what it was), or mash Ctrl+Z and hope I undo the correct number of steps.

 

MichaelBalzer_0-1620804223622.png

 

(Also pressing Esc on this window should perform a cancel operation and close the window).

Hi

So I have a cRIO with a 9203 mA input module. I also have sensors etc that are 4-20mA. So when it came to using the scaling feature of the shared variable as below see if you can spot the bug. 

sv1.png

So I was thinking in mA from sensor to mA input to the 9203 which is a mA module - but the RAW scale is in Amps! (Which is obvious once your colleague points it out!) Consequently I wasn't seeing any signal readings from the cRIO as 20mA << 4A. 

 

Since there is an error if you get Full and Zero around the wrong way... can there also be an error or warning if its outside the range of the module? 

 

sv2.pngsv3.png

 

Regards

Nick

Download All

DAQmx allows to register dynamic events , but how about NI-Scope, NI-Fgen , ....   if you have an event you can route to something in hardware it should be possible to register it also as an dynamic event in LabVIEW.

 

Basically, FlexLogger limits the range of readings to the values used in the 2 point calibration.  For example, if your sensor has a range of -10 to 10 PSI, and the 2-point cal is done at +/- 10 PSI, FlexLogger will only display values within +/- 10 PSI (and will saturate otherwise).

 

I totally understand why this is done, but sensors in fact DO read above (and sometimes below) their stated ranges and have documented accuracy (i.e. 1% above 95% full scale) , so clipping the value to the scaling settings in the cal page is the wrong thing to do...the sensor can still be measuring correctly, but FlexLogger will only show the saturated value.

 

The scaling, however it is done, probably result in a Y=mX + b equation, and FlexLogger should display Y, whatever Y is, regardless of stated sensor range or 2-point cal/scaling.

 

A worse case is if the sensor has a range of +/- 10 PSI but your cal/verification system is only capable of +/- 5 PSI, you will be limited to +/- 5 PSI with the FlexLogger 2-point cal implementation.

 

Yes, there are way around this, but why should the user, usually technicians who don't necessarily understand the math or ins/outs of software, have to figure out a way around FlexLogger?

For me it is very hard to spot channel that is connected on MAX schematic below:

 

image.png

 

By changing the color of connected channel it is way easier to spot:

 

image.png

Howdy!

 

I am trying to use a data acquisition system using python. There are thermocouple  modules and voltage modules that I would like to read from. It is set up and ran in 2013 LabVIEW and I am trying to put the test system into python for easy changing of the test and user control. 

 

I am wondering if the NI-DAQmx python library is kept up-to-date and if this is possible. I have been doing a lot of nitty gritty reading through the documentation on this library because there are not many examples of data collection using python to talk to the NI sensors. After trial and error attempts I have gone back to the basics to try and see if I can even change settings in the configuration of thermocouple channels. All I am trying to do is to take measurements from the thermocouple and I am changing the units from Fahrenheit to Celsius in separate runs. I can't even get this to work, even looking at example of this from Stackoverflow and the documentation where it specifically says how to configure the thermocouple channel (https://nidaqmx-python.readthedocs.io/en/latest/ai_channel.html and Ctrl-F to find thermocouples). 

 

Here is a snippet of the code I'm writing:

try:
    with ni.Task() as task:
        
        #Add the thermocouple channels to read from NI-9214's
        task.ai_channels.add_ai_thrmcpl_chan("cDAQ1Mod1/ai0:11", name_to_assign_to_channel='',
                                             min_val=0.0, max_val=100.0, units=ni.constants.TemperatureUnits.DEG_F, 
                                             thermocouple_type=ni.constants.ThermocoupleType.T)
        task.ai_channels.add_ai_thrmcpl_chan("cDAQ1Mod2/ai0:7", name_to_assign_to_channel='',
                                             min_val=0.0, max_val=100.0, units=ni.constants.TemperatureUnits.DEG_F,
                                             thermocouple_type=ni.constants.ThermocoupleType.T)
        
        #Set the thermocouple type to T
        #task.ai_thrmcpl_type = ThermocoupleType.T
        
        #Add the voltage channels to read from NI 9209
        task.ai_channels.add_ai_voltage_chan("cDAQ1Mod3/ai0:7")
        task.ai_channels.add_ai_voltage_chan("cDAQ1Mod3/ai9:12")
        task.ai_channels.add_ai_voltage_chan("cDAQ1Mod3/ai19:27")
        task.ai_channels.add_ai_voltage_chan("cDAQ1Mod3/ai29:31")
        
        #Set the rate of the Sample Clock and samples to aquire
        task.timing.cfg_samp_clk_timing(rate=Hz, sample_mode=AcquisitionType.CONTINUOUS)
        
        #Set the ADC Timing Mode to speed up the collection
        #task.ai_channels.ai_adc_timing_mode =  ADCTimingMode.HIGH_SPEED 
        task.ai_channels.ai_adc_timing_mode = ADCTimingMode.AUTOMATIC

 

This is a little frustrating to filter through the problems because there is not much out there that has the python use for help. If you search in the documentation search, the links of the results that you can click on are broken so that is another pitfall to this method.

 

Any help is greatly appreciated but I am curious if NI will keep the python library updated and running for future use.

 

NI-DAQmx python documentation: https://nidaqmx-python.readthedocs.io/en/latest/index.html 

Stackoverflow example help: https://stackoverflow.com/questions/47479913/python-nidaqmx-to-read-k-thermocouple-value

Thermocouple example: https://www.youtube.com/watch?v=NMMRbPvkzFs

As documented in a previous post, it is currently impossible to install the nidaqmx-python library into a Docker container. Enabling this functionality would create an opportunity for software teams to build cutting edge big data pipelines for measurement instruments using container technology. This could also optimize development time by including custom DAQ code in continuous integration pipelines.

I miss the possibility to select Global Virtual Channels defined in MAX into my Flexlogger project.

It is a lot faster to setup a measurement project for systems that don't change the connected sensors so often. 

Please add support for this.

When doing PWM with DAQmx, error -200684 is thrown if a 0% duty cycle is attempted.  For situations where a true 0% is needed, this is problematic. There are a few workarounds available, but some are less than ideal.  

 

The suggestion here is to pause the output if a 0% duty cycle is attempted.