From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
03-17-2021 09:55 AM
Hi,
I've been struggling sending the same data through two different TXs, one on channel 0 and one channel 1, the VI works for a single TX but when I change the "niUSRP Write Tx Data" block to 2D complex double it doesn't take the data in anymore and displays "you have connected two arrays of different dimensions". I was hoping the data in would just be sent out on both channels. I have tried fixing the problem using arrays and the channel writer both to no avail, but it is possible I have been using them wrong.
I believe I just need an in-line function to send the data duplicated side-by-side so that each channel has a stream of data to send, but I am just unsure how to do this.
Any help would be greatly appreciated,
Thanks,
Daniel
Solved! Go to Solution.
03-18-2021 04:33 AM
Hi Daniel,
The reason you're getting the behaviour you're seeing is because you now need to write a 2D array rather than a 1D array.
When writing for a single TX as a complex double, the input is a 1D array. This is so that you can write a buffer of values into the single channel:
However, when writing for a multi-channel write, you need to change this to a 2D array. This is effectively a 1D array per channel:
If you're just wanting to write the same data through two different channels, you just need to include a "Build Array" function, size this to 2 (for 2 channels) and wire the same value to both inputs of the array function, as in the screenshot above.
Cheers,
Nick
03-18-2021 07:17 AM
Hi Nick,
Thanks for the guidance, it was very appreciated. The last point you made what exactly what I was looking for, I knew there was probably an array or something I just had to stick in to fix it but wasn't comfortable enough with LabView yet to figure it out.
Thanks again and all the best,
Daniel
03-18-2021 08:04 AM
Hi Daniel,
No worries. Have you considered looking at the LabVIEW Core 1 course as an introduction to LabVIEW? It's general-purpose use with DAQ so doesn't explicitly cover the use of the USRP drivers but will help you be more comfortable with the LabVIEW environment in general.
Cheers,
Nick