10-22-2013 09:57 AM
Hi,
We are going to extend a setup consisting of a PXIe-8108 connected to two EtherCAT 9144 with a couple of modules. The extension requires a third EtherCAT 9144 daisy-chained to the second one in the current setup. This third EtherCAT contains amongst other modules (both AI, AO, and DO) a NI-9402 (fast DIO module) which is meant to be used for counting pulses (count rate up to 100,000/s). I have a similar setup with a cRIO as RT controller. There I could configure the input mode of the NI-9402 as a counter. Straightforward, no trouble at all. I was not aware of that this is not possible when using the module in an EtherCAT chassis. I have tried to create a customized FPGA personality, so far with no luck.
Is there a straightforward way to count pulses with a C series module installed in an EtherCAT 9144? Or is there simply no native counting module for the EtherCAT?
Is there any easy workaround which allows to get signals from a counter into the same VeriStand project?
Best regards,
Karsten
Solved! Go to Solution.
10-22-2013 11:18 AM - edited 10-22-2013 11:18 AM
Hi Karsten,
The local cRIO support is provided by what's called "specialty digital" functionality for scan engine. Unfortunately this is only supported on cRIO targets, and is not possible on EtherCAT hardware, so that's why it's not available in the custom device.
You can definitely do pulse counting on your EtherCAT chassis, but you'll need to program the FPGA. Once you've written the logic, you'll need to write the results to "User-Defined Variables", which plug into the scan engine. If you look at my post at the top of this page, I explain the general steps of how to do this.
If you search you can probably find some examples FPGA code of how to do pulse counting of a digital signal. Or maybe someone else can chime in and point you to some examples...
10-23-2013 05:01 AM
Hi Devin,
This solution I would consider as straightforward. Big thank you!
Writing the counter logic was done in a couple of minutes, everything works fine. When trying to make things work yesterday, I used the approach described here: https://decibel.ni.com/content/docs/DOC-13815
If it should happen that you visit Norway, tell me. I will buy you a beer 🙂
Regards,
Karsten
10-23-2013 09:33 AM
Sure, no problem! The link you post is writing personalities for the built-in FPGA support. This could be used for other FPGA targets (cRIOs, PXI R-Series cards, MXIe-RIO, etc..), but uses direct DMA communication to the target, not scan engine, so it can't be used with EtherCAT chassis.
Doubt I'll be in Norway any time soon, but I would definitely take you up on that 🙂 My brother recently took a week-long solo bike trip through Norway, and I'm very jealous of his experience. He said it was amazing!