05-24-2023 02:07 PM
Hi all,
My VI is not plotting all 4 points of data. I have using a cDAQ 9172, with a 9207 and 9211 card to pick up thermocouple and pressure transducer input. My VI that I have attached is plotting the thermocouple data but not the pressure data. I have confirmed in MAX that the pressure sensors are feeding signals in, albeit the mA signal is negative.
Let me know what you guys think. Thank you.
Solved! Go to Solution.
05-24-2023 02:29 PM
Hi CMSys,
cleanup your VI. Use Auto-Cleanup.
Then check your shift registers: one of them is not initialized like the others…
Your algorithm is flawed: there should be no case structure around the while loop!
And using a STOP function inside a loop is also a sign of bad VI design…
05-25-2023 02:28 AM
as has been said, your code is highly flawed and overly complicated. I would recommend to work out the logic with simulated data before implementing the hardware IO. Much easier to test and verify correct operation.
05-25-2023 07:50 AM
All good advice and suggestions. Thank you!
05-25-2023 04:11 PM
Thank you for your response Knight of NI. I have several follow up questions, and I have attached the most recent revision of the program. I would really appreciate it if you modified my code to integrate your suggestions. I am also now reading all 4 points of data, but:
1. My X-axis(Time) is not continuing to expand with the data points that its taking over time.
2. I was not able to figure out how to append all of the collected data through each loop, into an array that I would save as a file at the end,
given the user chooses to do so.
3. For my AI current channels, they are pressure transducers, and I need to convert these values to PSIG readings. I am not sure if I should use property nodes to do this, or which ones I would use.
Thank you
05-27-2023 12:30 AM - edited 05-27-2023 12:32 AM
@CMSys wrote:
Thank you for your response Knight of NI. I have several follow up questions, and I have attached the most recent revision of the program.
So far you have not attached anything, but here's how the data structure could look like: To scale the raw data into measurement units, you use calculations, not property nodes. I would operate directly on arrays. Values that don't need change, could use m=1, b=0, of course. Don't forget to set the graph to transposed (right-click...transpose array).