07-28-2020 12:22 PM - edited 07-28-2020 12:23 PM
Hello,
I am in the end of a long work and I have one, lasting issue.
It looks easy but I don't know if this is easy to solve.
I will explain the simpliest I can : I have a code that controls the pressure of a tank. This is a PID controller. It acquires datas from a pressure sensor via the DAQ assistant.
So my error is :These cannot be wired together because their data types (numeric, string, array, cluster, etc.) do not match.
The type of the source is Dynamic Data.
The type of the sink is double [64-bit real
I gave you my code and you can check. I actually can have math operations, like add 1 to these "dynamic datas". But when different "dynamic datas" have operations together I have this issue.
Or maybe it's the sift register that causes the troubles.
Anyway : has anybody an idea ? Or is there a way to convert these dynamic datas to numerics ? I tried the unbunddle function, it has not worked.
that would save me thanks so much for any idea
here is the code (it wont work because you don't have a subvi and the modules, but this is not a problem, let's focus on the code itself)
Solved! Go to Solution.
07-29-2020 09:43 AM
You are using the Dreaded DAQ Assistant (DDA), which uses as its default output the Dynamic Data Wire (DDW, which looks like a railroad track, and is a Data Structure that you should try to avoid at all costs). When the DDA and DDW were first introduced (about a decade ago), I tried using them, then gave up and went back to Arrays and Waveforms, much simpler, much easier to understand and manipulate. I did have to learn a little more about DAQmx, but the excellent LabVIEW White Papers and Tutorials you can find on the Web (do a search for "Learn 10 Functions in NI-DAQmx and Handle 80 Percent of your Data Acquisition Applications", and ignore the section on the DDA).
Getting rid of the DDW (and DDA) will make your code a lot better, a lot easier to understand, and will get rid of the errors and confusions.
Bob Schor
07-29-2020 01:39 PM
@Bob_Schor wrote:
..."Learn 10 Functions in NI-DAQmx and Handle 80 Percent of your Data Acquisition Applications"...
Getting rid of the DDW (and DDA) will make your code a lot better, a lot easier to understand, and will get rid of the errors and confusions.
I highly support the recommendation to review "Learn 10 Functions in NI-DAQmx and Handle 80 Percent of your Data Acquisition Applications", and I don't disagree with @Bob_Schor's opinion on DDW and DDA.
But in the meantime, you can use the "Convert from Dynamic Data Express VI" at the output of your DAQ Assistant(s) to convert your data into a more useful form.
In the Palettes, it's under Express>>Signal Manipulation>>From DDT
-joeorbob