Has RapidENILib been Moved/Removed?

[RMP 10.4.3]

Did you guys remove RapidENILib from RapidCode64.NET.dll? Did this assembly get moved to another file?

I have been using this to maintain my own external app that (re-)generates an ENI file.

RapidENI.dll was extracted from RapidCode64.NET.dll in an effort to make it compatible with .NET Standard 2.0. It is now embedded within the RapidSetup and rsiconfig executables. How were you planning to use it in your external application?

We were hoping to use that function in a future release as we have gradually been migrating to more dynamic EtherCAT detection. We often add or remove a Beckhoff slices and would like the system to detect the change and generate the new eni file. Currently the user has to remember to run RapidSetup and regenerate the ENI file.

We maintain a very small, standalone application that generates the ENI, just is it would happen in RapidSetup.

 NetworkDetails network_details = RapidENI.NetworkDetailsFromMotionController(mc);
 RapidENIResult result = RapidENI.GenerateENIFile(network_details, true);

Since there has previously been no way to do this outside of RapidSetup, we made our own utility.

I don’t insist on maintaining my own app, but I really need some way to forcibly regenerate the ENI file based on whatever’s currently on the network.

You may be able to include rsiconfig.exe as a resource in your .NET project. Your code will change to the following:

 NetworkDetails network_details = RapidCodeENI.NetworkDetailsFromMotionController(mc);
 RapidENIResult result = RapidENI.GenerateENIFile(network_details, true);

In which assembly is NetworkDetails defined? I have the same problem for RapidENIResult.

error CS0246: The type or namespace name ‘NetworkDetails’ could not be found (are you missing a using directive or an assembly reference?)

Hi Todd,

NetworkDetails is a type defined in RapidENI.dll, which is embedded and compressed in rsiconfig.exe.

We tried the suggestion of adding rsiconfig.exe as a reference in your C# project but noticed that it does not expose RapidENI.dll.

In the immediate term, you can:

delete EtherCAT.xml
run:
rsiconfig -generate

This will generate a new ENI file (EtherCAT.xml) and start the network. In the near term we’ll plan a way to release RapidENI.dll so you can use it programmatically and ideally with documented, public API.

If the network is already started, when I delete EtherCAT.xml and run rsiconfig -generate, it doesn’t do anything. I have to stop the network to get the utility to do its thing.
Is there a way to regenerate the file while the network is still running? Or is there a way to stop the network from the tool?

No, rsiconfig does not have a way to generate the file while the network is running, nor can it stop the network.

If the network is already running, doesn’t that imply you already have a good EtherCAT.xml file? (Or had a good one before you deleted it?)

How about we add another command-line argument, specifically/exclusively for generating ENI files?

doesn’t that imply you already have a good EtherCAT.xml file?

Generally, this is true, but if the operator (or support tech) starts the network outside of our application (i.e. RapidSetup), our app won’t know that the ENI is valid (there’s no way to tell unless the network doesn’t start, but that can have multiple causes).
I could perhaps check to see if the network is running and then assume that everything’s OK. Prior to this, our application had been keeping track of topology changes and assuming ownership of the ENI file, so that when the topology changed, we just automatically decided (based on other criteria) whether or not to regenerate the ENI.

It would be handy to have a swiss army knife command line utility, though there’s probably not a great benefit to you for maintaining one. It would at least be nice if the tool could also satisfy its own requirements—stopping the network, in this case—but if it could regen regardless of the network state, that would be enough.

10.4.4 (now released) adds a -eni subcommand:

1 Like