04-18-2019 09:38 AM
I have created a custom device based on the Inline Async custom device wizard. It uses a VI called "Report errors" to stop my async loops ( I have several dozen running in parallel) and report the error on undeploy. It seems like this VI just runs too slowly for my custom device to keep up. How can I make it run faster or remove it all together and still get my custom device to stop on undeploy.
04-19-2019 03:46 PM - edited 04-19-2019 03:47 PM
Hey ARLROB,
I'd be curious about a couple things:
04-22-2019 08:42 AM
1. The Primary Control loop for our system is running at 200Hz. We am publishing and subscribing using my custom device on several dozen topics. Therefore this loop also needs to run at 200Hz.
2. Hard to say how fast it is currently running. This is part of a Veristand custom device on a cRIO target, so we don't have good diagnostic information. We did do some timing analysis of each of the individual components using some simple VI checks. See #3.
3. I put some timing diagnostics inside the main loop on a test build (i.e. Tick Count (ms).vi) and passed that data out via UDP. I put those before and after everything that was happening during each iteration of the loop. That VI consistently took the longest of all of our VIs in that loop to run (it took more than triple the time to run than VI on the lower left to "READ" data from Veristand). Additionally, when that VI is included, the fastest we can get our topics to run is about 90-92% of what they need to be. For example, we have data that needs to be published at 100 message/sec. However, when that VI is used, the fastest we can get it to go is about 92 messages/sec, with lots of variability (+/- 3 messages/sec). When the VI is removed/disabled, the DDS publishing is able to keep up to our timing requirements.
Important to note that we have tried multiple ways to move that VI from our main loop to a second (slower) loop, using notifiers/queues, and only using a single instance of it to try to stop our VI loops, but no matter the location or implementation of that VI, it seems to slow everything down for us.
04-24-2019 10:42 PM
It sounds like you've done some extensive testing when using the Inline Async Custom Device Wizard, which uses the VeriStand Addon Inline Async API. Have you tried using just the API (instead of the wizard), or using this example as a starting point?
04-24-2019 11:09 PM
It looks like the example that you provided uses the same VIs and is the same framework as what gets generated by the inline async API.