From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-21-2013 08:58 AM
I want to explain it that I cannot set fixed size of my array at even RT side because the elemets of array are formed by interpolating the spline position!
and each time the position varies the #of elemets vary and hence the size!
😞 so now, do you think mark code will be helpful there?
02-21-2013 10:25 AM
How are you sending the array down to the FPGA? From what I'm hearing, it would have to be via a DMA.
What you could do is to check to make sure the two arrays are the same size. If not, duplicate the last element of the smaller array until they are the same size. Then you can interpolate and send the data down to the FPGA via the DMA. Worst case, your FPGA repeats a position command.
02-21-2013 10:40 AM
Yes I am sending my data through DMA channel!
but I am using single DMA to send data for two motors
both motors have to move at different angles!
The position is then interpolated using spline generation , so with different angle each time we would be having different elemets of array!
If I can repeat how can I do this?
How would i be knowing where to repeat from??
Its not a constant size of array always because we shouold program it in a way that we can change angle for both motors any time
Sara
02-21-2013 11:00 AM - edited 02-21-2013 11:01 AM
You repeat from the end. That way the motors stay in their final position while the other one moves (assuming the array lengths are different). Try this.
This is a snippet. Save it to your desktop. You can then drag the image into a VI and the code will automagically appear.
02-21-2013 01:52 PM
the case 1 will also be the default case.. right?
and what is in case 0?
Can I see the pic of that too just to make things work in similar way!
Thanks
02-21-2013 02:10 PM
@SaraBaber wrote:
the case 1 will also be the default case.. right?
and what is in case 0?
Can I see the pic of that too just to make things work in similar way!
Thanks
Did you follow my directions of porting that picture into your code to be actual code?
There is no default case. I used "..-1" which means array 2 is larger than array 1, "0" which means the arrays are the same length, and "1.." which means that array 1 is larger than array 2. In case 0, I just passed the arrays through. With the other two cases, I increased the length of the smaller array.