07-11-2018 07:31 AM
07-12-2018 03:39 PM
Hi upatel:
A couple of question to understand better this issue:
1) By NI MAX GUI do you refer to NI MAX the software or to something else?
2) Can you upload an image of the code or is it based on some particular example?
07-19-2018 06:55 AM
I`m still having the problem.
Yes it`s the NI-MAX software. When I launch it (running in the background) my simulation timing is good (I`m using this as my workaround for now).
Attached is my code
Umesh
07-20-2018 12:09 PM
Hi Umesh;
This is some interesting behavior and I think it could be related to the NI CAN driver. This driver stores the configuration information in a MAX internal database. When opening MAX this opens the GUI and starts the background services which also start the database. This could explain the time difference in execution.
With XNET this should not occur since the configuration is not stored on MAX.
One thing to try could be to open MAX, close it and then run the code to see if the difference still happens. I would think that it should run fast as the database is already initialized.
Hope this helps
07-23-2018 02:05 PM
I tried that, when I close MAX the timing is not good, as soon as I reopen MAX the timing is good (this is while my code is running)….very bizarre.
Umesh
07-24-2018 03:15 PM
Hi Umesh,
We have seen this behavior before, where MAX running in the background improves the execution time of LabVIEW code that uses the NI-CAN driver to interface with NI-XNET hardware via the NI-XNET Compatibility Layer.
As already hinted at by cdiaz95, this is because MAX likely loads up the compatibility layer at startup, whereas your code does not already have it in memory. When NI-XNET first came out, the compatibility layer was intended to help developers slowly transition code bases over from NI-CAN, and was not intended to be a permanent solution for continual development. It is, of course, still okay to use, but its behavior is more complicated than using exclusively NI-CAN or NI-XNET.
Since you're using an NI-XNET device, I recommend fully migrating your code base over from NI-CAN to NI-XNET to see if you experience improved execution time without MAX running in the background. If you don't mind MAX running in the background, then simply keeping your code as-is makes the most sense for now.
07-25-2018 09:40 AM
For this project I`ll use the work-around by running NI-MAX, but for the next project I`ll migrate from NI-CAN to NI-XNET completely.
Thank you Mike,