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.
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
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:
Can I suggest you bypass all the data aquisition and programming and just use a trip amplifier?
This will mean that your battery protection is independant of your computer & software.