10-14-2014 08:42 AM
Hi Jian,
There are basically two ways to do it:
Sounds like you are doing #1. It should be OK to run at 3-5kHz depending on what hardware you're using. If you're using a 9082, you can go into BIOS (press delete on a keyboard while it boots), and select that the CPU runs in 1 core mode (rather than 2 core). This significantly increases clock speed of the CPU and might increase performance. You should also make sure "Legacy USB" is disabled, as that causes jitter. Also, check inside MAX ->Ethernet settings tab -> Advanced to make sure the Ethernet port is set to polling mode, as this is less jitter.
Finally, you can eliminate some of your event timing inputs to improve performance. For example, if the FPGA has 8 event measurements with 4 captures each... but you know you will only use 6 measurements and 1 capture... don't add them to the system definition.
10-14-2014 01:31 PM
Thanks, Stephen
I have following questions regarding to Angular model:
1. Does '1 core mode' mean to disable 1 core? If I only enable 1 core, I see that 'Turbo Boost' is automatically selected.
2. For Ethernet setting tabs, do you mean to change 'Packet Detection' to polling?
3. Another werid phenomenion is that, once I increase the Target Rate to 5K, the scan engine custom device does not work. By not working, I mean that I have a dial which is mapped to e.x. AO1 and it does not output the voltage.
10-14-2014 01:39 PM
Hi JianZ,
10-14-2014 02:33 PM
Hi Stephen,
I have 1 NI-9403, 1NI 9862(not showing up in system explorer), 1 NI9264 and 2 NI 9401. Currently I am only using the NI 9264 to ouput 0~5V.
When the scan engine stops working at 5KHz, the Scan Mode State changed from 2 to 3 with the other 3 varialbes stay at 0.
Previously, I did not select synchronize ni verisant to scan engine. Based on your description, I selected it and saw 'Master Custom Device' showing up in Controller configuration. Which custom device should I select as master?
Thanks.
Jian
10-14-2014 02:37 PM
Hi Jian,
Mode 3 means fault mode. Therefore it appears the 9144 is failing to run the rate you've requested. To get more detail about the fault, can you open the distributed systems manager (from start menu), add your target, and then inspect the fault window.
The scan engine device automatically sets itself as master if you check that box, which is correct. Did that improve performance?
What version of NI-RIO, Industrial Comms for EtherCAT, and the custom device are you using?
Thanks,
10-14-2014 03:13 PM
Hi Stephen,
The attached image shows what I saw in distributed systems manager. I am using AO14 and AO15. I opened up the probe for the two pins and not sure about where to find the fault window.
Select the syncnization does improve performance:
1. 2 cores, ethercat: line interrupt. CPU load dropped from 68 64 -->58 50, others 0. Fail at 5KHz
2. Single core, polling, 1ms(how will this 1ms affect performance?). CPU load drop from 76 to 67, async loop duration is 26us. Fail at 5KHz and the HP count increases continuously.
Based on the CPU load and async loop duration, I kind feel that 2 cores have better performance.
NI-RIO -->14.0.1, Industrical Comm -->14.0, Scan engine-->4.1.4
10-14-2014 03:21 PM
Hi JianZ,
The scan engine custom device's "Async loop duration" channel should be zero if you have synchronize ni veristand to scan engine' true. Are you sure that was done when you did your single core test?
Polling 1ms is fine. It just dictates how often the target checks for new ethernet data.
Can you click on the target (top level item) in the distributed systems manager and see if there are any fault codes present when it fails?
Also, can you graph the system channel "hp loop duration" and the engine simulation toolkit status channel "loop duration"
Thanks!
10-14-2014 03:38 PM
Hi Stephen,
1.You are right about the async loop duration. It only happens without sync.
2. Error Code: -66460, Level: Major, Description: 'LabVIEW: The I/O scan time exceeded the NI Scan Engine period you specified on the Scan Engine page of the target properties dialog box. ========================= LabVIEW: The I/O scan time exceeded the NI Scan Engine period you specified on the Scan Engine page of the target properties dialog box.'
3. When fault(mode 3) happens, following is the graph for the two variables.
Jian
10-14-2014 03:41 PM
OK it looks like the engine simulation toolkit custom device is taking 20uS, and the PCL is taking up to 70uS. So those are well below the 200uS you need to do 5kHz loop rates. Therefore, I suggest increasing the EtherCAT cyclic bandwidth from 40% (the default) up to 60% or higher to see if that helps. It is a property on the ECAT master page.
10-14-2014 03:59 PM
Hi Stephen,
I tried 60% and 70%, and it works at the beginning and fails after like 2 seconds. At the same time, the HP count keeps increasing. In the description of EtherCAT cyclic bandwidth, it seems that increasing this number will decrease the time left for other tasks(model). Does the HP loop duration mean the time spent on all other tasks? specifically, the model needs to run fast.
Thanks.
Jian