LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

error with analog input to PI controller to digital output

Hello. I am fairly new to LabVIEW and am having a problem taking an analog input, using a PI controller, and then outputting that signal using a digital output. My Labview file is attached.

 

Whenever I run my code, I reveive an error 200463 which says:

 

"Specified read or write operation failed, because the number of lines in the data for a channel does not match the number of lines in the channel.

If you are using the Digital Waveform datatype, make sure the number of lines in the digital waveform matches the number of lines in the channel. If you are using boolean data, make sure the array dimension for lines in the data matches the number of lines in the channel."

 

I am using a cDAQ - 9178 with a NI 9205 and NI 9472 attached. I am reading in a signal from a K - type thermocouple using the NI 9205 and inputing that signal into a PI controller in Labview. I am then trying to take the output from the PI controller, turn it into a digital waveform, and output that as a digital output through my NI 9472 to my solid state relay. I am using DAQmx. 

 

The error leads me to believe that there is something wrong with how my DAQmx Write Digital waveform is interpreting my signal, but I am not sure how! I am also unsure how to properly use the PID set profile vi so that I can control how quickly I ramp up my signal, so any ancillary help with that is also appreciated.

0 Kudos
Message 1 of 2
(2,536 Views)

Hi mshinn,

 

when you want to generate a PWM output signal then why don't you do this?

 

- DAQmx has the ability to use certain digital outputs for PWM output. Does your cDAQ+9472 support this option? If so: use it!

- I never used the DAQmxWrite with a digital waveform, I always output boolean arrays. And usually I set a sample rate for DAQmx channels…

- Your stop button misses a label. NEVER delete labels of controls!

- Does it make sense to read thermocouple values with 1kHz sample rate?

 

On your error: did you check the digital waveform data? What channel(s) did you set in the DO channel control?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 2
(2,520 Views)