I have a question that I hope you can help me solve.
I'm working on a project where I'm supposed to configure a PXI as a real time controller to regulate in closed loop various axis of a test rig. The control loop implementation, Veristand setup etc is easy enough however I'm confonted with the problem having to read the controllers set points from an external source.
Since the control loops run at 5 kHz, I also whish to read the set point at the same rate and I would like to use the cPCI-5565PIORC reflective memory module. Now, in terms of MB/s the card would be well within capacity but I cannot find any mention of maximum refresh rate of variables in the reflective memory and it cannot be as simple as checking the MB/s.
Can anybody with expirience in this field help me out?
just a couple of questions. Are you using only one PXI? Since reflective memory is used for sharing data, what are you sharing data with?
I recommend some links you might find useful (if you don't know them already):
the network will be composed of at least 2 PXIs: one will run several mathematical models to calculate the set points, the other PXI to actually close the loop.
The fact that one PXI run the models and the oder closes the loop is mandatory so I cannot simply run a subset on models on the PXI that will eventually close the loop relative to the models calculation.
Since the set point calculation does not take place on the controller PXI I need to send the set points to the controller and I was wondering about the maximum rate the RM can handle.
Thanks for posting the links I've allready reviewed them and I also read the board datasheet and unfortunately there is no mention regarding the maximum update rate of the RM data just the aggregate MB/s. I just need to share 10 16-bit values at high rate rather than thousands of variables which I suspect is more of the normal role of the RM.
From my understanding, you want to have ~10 channels at ~5 kHz in Reflective Memory. Is that correct?
The answer is more nuanced than yes or no. This will partially depend on your PXI controller and what else is happening on the system. I would expect this to be feasible, but I would recommend you benchmark how much your CPU usage increases when using Reflective Memory at 5 kHz. Typically, the higher the channel count or the faster the rate, the higher the CPU usage on a given core of your PXI controller. I personally have not run a system with Reflective Memory at 5 kHz, but I have not had such a small channel count either.
We have been using reflective memory between 2 PXIe systems and some RT PCs with a high channel count, but only at 1000hz. We did this in VS2013 and found that the built in Ref Mem on Veristand didn't meet our needs because it would write/read each channel separately instead of in a block. This caused the CPU usage to be very high and slow down our system. You might be running into the same issue if NI hasn't fixed their Ref Mem code in VeriStand. We wrote a custom device from a sample NI gave us that used Ref Mem and modified it to look at all the Ref Mem channels and do block read/writes. This worked very well for us.
As Joshe mentioned, the Reflective Memory Custom Device can provide better performance especially in high channel count systems. It can be worthwhile to attempt to use the native functionality to start, but the custom device can be an alternative if necessary.