Counter/Timer

cancel
Showing results for 
Search instead for 
Did you mean: 

"Internal Software Error (-224707)" encountered when calling DAQmxReadCtrTicks (implicit buffered pulse measurement)

Im am using v9.8.0 of NI-DAQmx, the NI hardware is a PCIe 6320 in a Siemens IPC running Windows 7 Enterprise. My software is writte in Delphi (and uses a Delphi adaptation of the C API).

We have been using this and similar setups very successfully for over a decade.

 

I am setting up an implicit buffered pulse measurement (for obtaining the high and low pulse lengths of a TTL encoder signal, counted in ticks) like this (only the parts that I think are relevant):

- I am calling DAQmxCreateCIPulseChanTicks with a minVal of 2 and a maxVal of 1000000.

- I am calling DAQmxCfgImplicitTiming, choosing continuous sampling

- After starting the task (which is done using an arm start trigger), I am calling DAQmxReadCtrTicks, where I choose to read whatever values are present (-1) with no timeout (0).

The error code returned by DAQmxReadCtrTicks is -224707 (which is undocumented), the error message reads "Internal Software Error occurred in C_API software. Please contact National Instruments Support. (-224707)".

 

(Note: I am also doing some other stuff in my setup, e.g. another one of the 6320's counters is used for a different counting task (quadrature encoder position). There is also other NI hardware present & used, like a PCI 6133 and a PCIe 6509. The error message happens only if I add the above to my otherwise happily working setup. So there is a possibility of "interference" with the stuff I do. Normally the NIDAQmx error messages are quite helpful in pinpointing the root cause. In this case, however, I triggered something bad ...)

 

Has anyone ever encountered this error message / code?

0 Kudos
Message 1 of 8
(3,993 Views)

I am partially answering my own post here.

 

I have come to the conclusion that the combination of

  • NI PCIe 6320
  • DAQmxCreateCIPulseChanTicks
  • DAQmxCfgImplicitTiming, choosing continuous sampling
  • DAQmxReadCtrTicks

does not work, the Read function fails on the very first attempt. A different error occurs if you change continuous sampling to finite sampling. (I tried both Delphi and C (Visual Studio 2015), the latter being a very reduced sample program derived from one of NI's examples. During my C experiments I encountered several BSODs when calling DAQmxRead... functions. I think that this is a sign of insufficient testing within NI.)

 

A very similar setup works, if you do everything using ...Time instead of ...Ticks (irrspective of continuous or finite sampling). So the ...PulseChanTicks feature seems broken (and untested by NI) to me.

0 Kudos
Message 2 of 8
(3,936 Views)

I must make a further remark. The variant using the ...Time functions instead of the ...Ticks functions *only* works if I call the DAQmxReadCtrTime function with a positive number of samples to be read (and a nonzero timeout). If I (which I usually do) call it with -1 as the number of samples to be read (meaning "whatever samples you have right now") and zero timeout, a runtime error also occurs. Again a sign of incomplete testing.

There are no such limitations e.g. with all analog input tasks or quadrature (position) counter tasks I have used in recent years on a multitude of NI boards.

0 Kudos
Message 3 of 8
(3,932 Views)

Hello,

first of all thank you for your question.

You wrote that you are using the DAQmx 9.8.0 version. Is there a special reason why you use such an old version?

I recommend to install the newest version 16.1, which can be found here:

https://www.ni.com/en/support/downloads/drivers/download.ni-daq-mx.html#288260

This version supports Win 7 and the NI 6320.

Can you please check if the error occurs after an update?

Best reards

 

Florian Fischer
Trainee Applications Engineering, NI Germany
Certified LabVIEW Developer
0 Kudos
Message 4 of 8
(3,903 Views)

Thank you for your answer and advice. Let me observe the following:

  1. v9.8 is from August 2013, I would not call this "such an old version."
  2. This software is part of a complete and complex machine. I do not change the software of this (working) machine just because some of its software is "old."
  3. If I have a guarantee that there is a clean and working upgrade path from v9.8 to v16.1 I would be happy to use it. Unfortunately, in the past, we have encountered lots of problems when trying to upgrade NI-DAQmx and/or NI-SCOPE (which is also part of the system). E.g. sometimes the old version would not completely uninstall and also keep the newer version from successfully installing. This is why I am very careful with updating software in working environments.
  4. Upgrading NI-DAQmx would be worth the risk if I had a clear indication of whether my problem has been fixed in the versions issued since v9.8. To be able to assess this, I would have to have access to complete release notes for NI-DAQmx. The only thing I know regarding this are the readme files accompanying the version downloads. I doubt the small tables contained in these readmes titled "Bug fixes" really contain everything that has been fixed. It is also quite cumbersome to try and locate all these readme files.
0 Kudos
Message 5 of 8
(3,900 Views)

I actually found a useful link: http://www.ni.com/product-documentation/52784/en/ 

0 Kudos
Message 6 of 8
(3,899 Views)

A quick read of the readme files since v9.8 of NI-DAQmx reveals no fix that sounds like it pertains to my problem. There is also a statement that says that more bugs are probably fixed than are shown in the readme file. So I am not sure how to proceed, especially since I found a working solution for my problem (i.e. using the ...Time functions).

0 Kudos
Message 7 of 8
(3,896 Views)

Hi,

thank you for your answer.

Your worries about an update are vaild. It could be that changes has to be done at your system to fit to the new driver version. I also had a look at our internal database, but could not find an entry related to your problem.

After all it may be a good solution to stay at your current driver version and use the workaround.

If you decide to update the driver please let me know if it solves the problem.

Best regards

Florian Fischer
Trainee Applications Engineering, NI Germany
Certified LabVIEW Developer
0 Kudos
Message 8 of 8
(3,881 Views)