I have just bought a CRIO-PN module with CompactRIO to realize the Profinet communicaiton function.
And I use the Official Example File (CS_cRIO-PN_IO-DeviceExample(FPGA).vi) to realize the funciton Receive/Send Profinet signals Loop. I want know how quicke can be realized for a profinet Signal Send/Receive Loop.
According to the Official document, To send command and receive signal from Profinet Communication network must go through following Process:
Set Input Data - Read/Write IO data - Get Output Data
After I do the test, the time consuming for each process is as following:
Set Input Data(1ms) - Read/Write IO data (2-4ms) - Get Output Data(1ms)
Which means that for this one communicaion loop, it needs take 4ms-6ms to finish whole process.
As I want get the communication loop finished as quick as possible, I want know if there is any method to reach this target? My target is kind of reach communication loop finished within 1ms if possible (RT) or even better reach within 250us (IRT), to get maximum usage of Profinet network.
You can find following pictures of my test VI,
After my test, you can see for one I/O read/Write process finished, it takes about 4ms.
Do you have any precious idea regarding how to optimize this read/write loop? If there is any optimizaion on the FPGA level that that can reach this target?
Really sorry for the inconvenience caused, if anyone know some better solution for this?
Thank you very much.
From the screenshot it looks like you are running the code on Real-Time. You could use the FPGA API directly, which is described in chapter 4 of the manual. This is slightly more complex / low level than using the Real-Time function, and will give you better performance because you're not transferring data from RT to FPGA and back each cycle.