NI VeriStand Add-Ons Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Scan Engine & EtherCAT Custom Device Feedback

Hi David,

In regards to your post on May 24th:

Custom PWM functionality:

If you are talking about scan mode with a local cRIO chassis, you're currenlty limited y the functionality provided by Specialty Digitial, which consists of a fixed set of frequencies.  This functionality is provided by the NI-RIO team, and is not likely to change any time soon.  Since we also don't currenlty have a way to do hyrid mode from a cRIO in NIVS, my recommendation would be to not use the scan engine custom device, and to use an FPGA personality instead.  Once hybrid mode is possible, it should be possible to use scan mode and implement the custom PWM in FPGA.

For an EtherCAT chassis, you can currenlty make a hybrid personality that uses scan + UDVs to communicate with your custom PWM code on the FPGA.

Simultaneous switching:

This behavior is not specific to the scan engine custom device; the custom device simply reads all relevant channels from NIVS.  Since NIVS updates all channels each iteration of the loop and performs all mappngs at the same time, it is possible to use this for simultaneous updates.  For example, you could have a single User Channel mapped to multiple digital outputs.  When the User Channel changed, all digital outputs would update simulataneously.  You could also direclty update all the digital lines from a stimulus profile and have them all update simultaneously (it is possible to update multiple channels in one time step).

In regards to your May 28th post, I agree with everything Stephen said.  To directly answer your questions though:

a) EtherCAT through the Custom Device: it would be great because the "just configurable" approach, but I guess it won't work for the same reason (shortage of DMA channels) becuase I cannot use XNET, Scan Engine and Custom FPGA with NI Veristand on RT target. What do you think? In case it didn't work, would you have any solution development in the short term? In any case, what's the loop rate limitation of EtherCAT (1KHz? Would it work with 2KHZ loop rate, accepting to have the I/O updated every 1ms?)

This sort of configuration will work.  The DMA FIFO limitation only applies to the FPGA of the 9082.  Since the scan mode will only be used to support the EtherCAT chassis, and not the local FPGA, no local FIFOs on the 9082 will be used.  So you can have custom FPGA + XNET on the 9082 and still use an EtherCAT chassis with the scan mode custom device.  The max EtherCAT loop rate will vary greatly depending on the RT controller and the total amount of I/O channels.  With limited I/O and a fast controller (PXIe-8133 or PXI-8108) we have seen rates >8kHz.  So, for the 9082 I don't expect 1-2 kHz would be a problem

In the past a colleage ran a benchmark with a 9082 (running in single-core mode) and the scan mode custom device in NI VeriStand.  The benchmark included both local and EtherCAT channels, a total of 184 analog channels, 64 digital channels, a model, and 4th order filter calculations.  With the scan rate at 2kHz in this setup he was running at 48% CPU.  So hopefully that should give you an idea of the approximate performance you can expect.

b) Ethernet expansion with NI 9148: hoping that 0,5ms (or 1ms) updates will be supported on a dedicated network, I'm worried about the effort required in order to allow easy and configurabile integration into NI Veristand? Do you have specific resources? What do you think about?

I haven't really used the 9148, so I can't confirm the rates, but I don't expect you could reach 1-2kHz single-polint updates.  It uses non-deterministic Ethernet communication, so there are no guarantees on communication latencies.  It also is not natively supported in NIVS and would need a custom device written for it.  This code could maybe be based on the scan/EtherCAT custom device, but the RT code would need to e rewritten to accomodate the non-scanned IOVs.  It would take a lot of time and coding to implement this, and the end result would not be as reliable as EtherCAT.  So, I would not recommend this approach at all.

Hope that helps.

Regards,

Devin

0 Kudos
Message 61 of 676
(5,065 Views)

Hi Devin!

I have a VeriStand application where I would like to run an RT application with a PXI and EtherCAT. I have tried to follow all the instructions for this custom device but I am unable to detect my C-Modules placed in the EtherCAT chassis. See screeen shot below from my system definition in VeriStand. I use VeriStand 2011SP1 with the 3.4 version of this add on.

The Auto Detect function seems like it doesn't do anyting. I have tried to manualy add the EtherCAT chassis and configure the modules, however when I try to deploy after that I get the error 537700 saying that an error occured with deploying the System Definition File. Otherwise I do not get an error which on the other hand migh be that I simply do not have an EtherCAT chassis added in my system definition file.

I have also tried to use LabVIEW 2011 SP1 just to check that it is possible to detect the modules. By opening a LabVIEW project and add a PXI target with EtherCAT is is no problems to detect all the individual modules in the EtherCAT chassis.

Do you have any ideas why I'm not able to detect the EtherCAT chassis and the modules using VeriStand?

Best regards

/Martin Sveningsson

0 Kudos
Message 62 of 676
(5,065 Views)

Martin-

I don't see a screenshot.  Are you attempting to do only scan mode, or are you doing a hybrid mode (FPGA personality plus some scan mode modules)?

Regards,

Josh

0 Kudos
Message 63 of 676
(5,065 Views)

Hi!

Only trying to do Scan mode at the moment. I do not know were the screenshots went

I make another try:

In LabVIEW: No problems finding the EtherCAT Moduels.

LabVIEW.jpg

In VeriStand:

I find the Scan Engine and EterCAT Custom Devices but the auto detect of the modules does not work for me.

Veristand.jpg

/Martin Sveningsson



0 Kudos
Message 64 of 676
(5,065 Views)

Did you install the remote detection web service to the target with MAX? It is one of the install steps. If that is not explicitly installed (it is unselected by default), auto detect wont work

Stephen B
0 Kudos
Message 65 of 676
(5,065 Views)

Yes it should be installed.

/Martin

MAX.JPG

0 Kudos
Message 66 of 676
(5,065 Views)

Hmm. So to be clear, when you click the auto detect button nothing happens? Can you describe exactly anything that goes on?

Stephen B
0 Kudos
Message 67 of 676
(5,065 Views)

Well i get the following dialog after pressing Auto detect Modules

Dialog.JPG

After pressing "Yes" nothing happens

/Martin

0 Kudos
Message 68 of 676
(5,065 Views)

Hmm if nothing is populating that means it didnt detect anything. I'd like to isolate this from the custom device if possible. Can you download these two attached VIs, place them in the same location, and run the top level one?

Post your results here please.

Stephen B
Download All
0 Kudos
Message 69 of 676
(5,065 Views)

The 537700 indicates that the custom device did not detect an EtherCAT Master which matches with your system definition (iw. Master 0 was not found).

Two things to try:

1) Under the 9144 slave in the custom device, go to the "User Variables" section and click the "Revert Slave to Scan Mode" button at the top.  It's possible that your 9144 has a custom bitfile deployed to it... In your LabVIEW screenshot the modules are underneath the FPGA of the 9144, not directly under the slave itself.  Did you manually add the modules there, or did LabVIEW autmoatically detect them there?  There is a known issue where the API I use does not find the master or slave if there are no modules in the 9144.  I haven't tested, but this may also be teh case if all of the modules are currently reserved by the FPGA of the 9144.

2) FTP into your PXI controller and delete the contents of the c:\ni-rt\config directory, then reboot the controller.  You should make a backup of the files in this directory first, in case you wish to restore them.  The dynamic variable API can behave unexpectedly if there are variables deployed from LabVIEW, shich can be stored as config files.  Deleting these files can put your system back into a clean state, which should hopefully allow you to deploy and detect the modules successfuly.

Message 70 of 676
(5,066 Views)