03-02-2023 06:19 PM
First, I am new to DAQexpress
My goal is simple: Plot a discharge curve for a battery with a load across it, then disconnect the load when the voltage drops below a threshold to prevent damaging the battery.
I can chart a battery voltage using NI USB 6008. I can turn the relay on and off with a digital output. But I can't figure out how to compare the voltage data stream (1D waveform?) to a constant to turn off the relay. There is a data type mismatch that I don't understand.
Should be simple, but I am stumped!
Please help if you can.
Thanks,
Matt
03-02-2023 07:47 PM - edited 03-02-2023 07:52 PM
Not sure how much you can program in DAQ express. Can you show us your code.
03-02-2023 08:55 PM
not sure how to upload code... My problems seem to be related to mismatched data types. Can't compare a 1D waveform from the DAQ to a constant. not sure how to trigger the DAQ digital out from a boolean comparison
03-03-2023 01:04 AM
You should be able to get the y component of the waveform and index out the last element.
(Sorry, I don't have DAQexpress, but it looks similar to NXT.)
03-13-2023 06:23 PM
was not able to figure out how to get the y component and index to the last element. got it sort of working by changing the DAQmx data format from waveform to "floating Point". but now, after 1000 while loops, I get this error:
here is what the code looks like:
03-27-2023 04:24 PM
Can I suggest you bypass all the data aquisition and programming and just use a trip amplifier?
E.G https://www.pepperl-fuchs.com/global/en/32554.htm
or https://uk.rs-online.com/web/p/signal-conditioners/7966913
This will mean that your battery protection is independant of your computer & software.