Hi Franbo,
Sorry for the delay. The broken run error may mean that the toolkit installation is corrupt and you should reinstall it.
The error -2147287010 may be caused because the DSP was not halted before the code was downloaded to the DSP. Try closing CCS, resetting the DSP, and perhaps cycling the power.
Here are some suggestions:
- Move "RTDX_CreateOutputChannel(out);" from DSPsin2.c to the top of DSPsin2_main.c, perhaps after the two #define statements. That's by no means the only valid location, just a suggestion.
- It appears that there is also a problem with your call to RTDX_Write( &out, &rtB.Sine_Wave[0], 256*sizeof(real_T)) because of where you placed the ampersand. Instead, try:
RTDX_write(&out, &(rt
B.Sine_Wave), sizeof(rtB.Sine_Wave)); //make the "w" in "write" lowercase
- It's also possible that LabVIEW is not interpretting the real_T datatype properly. You could create an additional array of type double and pass that to the RTDX_write instead.
- In LabVIEW, you'll need to ignore some of the errors returned by RTDX because LabVIEW may try to read from the buffer before data is available.
I cannot compile your project because I'm missing the libraries, dsp_rt_c6710.lib and rtw_rt_c6710.lib.
Let me know how it goes.
Kristi Hummel
Applications Engineer
National Instruments