Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

application startup slow....

Hi all
 
Am using RT PXI 8186 with pharlap ETS, i have requirement to start about 8 processes when a command is received, these processes are instrument i/o process. when i run the VI targetted to the PXI all the process start almoust simultaneoulsy, but if i create it as application the processes take long time to start, almost 1 minute. How can i improve the start up time or how can i make sure that all application start almost simultaneously?
 
Regards
Arun
0 Kudos
Message 1 of 9
(4,768 Views)
Do your processes include DAQmx property nodes (such as get a list of channel names)?

We have found (and had confirmed by NI) that DAQmx property nodes on RT run up to 50 TIMES slower than on a PC or when targetted to the RT.  While testing, getting a list of 9 channel names took 7500ms (yes, 7.5 seconds) in development mode (targetted) but when run as an executable getting these same channel names took 40,650 ms. And Create Task has similar issues.

There is no easy way around this. All DAQmx property nodes take longer in an RT executable. We have had to modify our code to do everything at startup and then store the information. Makes for a long startup but faster running.

If your code does not use DAQmx property nodes or Create Task, then please excuse my little rant. Can you have the processes output timing information to a file to see what is taking so long?

     Rob
0 Kudos
Message 2 of 9
(4,754 Views)
Hi Robert
 
Thanx for the reply, Am using the DAQmx VI's and property node in one of my application, but the application i have mentioned does not use and DAQ Vi's. The application in which am using the DAQmx VI's is as you said quite slow while configuring the channels, takes about a minute for me to create a task set the property and start the task(am using 256 channels).
  But the application am having problem with right now does not have any DAQmx VI's, but have serial port configuration VI's.
I guess this VI is causing the process to slow down during start up, any way i just wanted to make sure that the problem is not with my
arcitecture.
 
Regards
Arun 
0 Kudos
Message 3 of 9
(4,750 Views)
We haven't had any problems with the VISA VIs. Even serial port configuration only takes a few milliseconds (unless an error occurs). Interesting.  Do you have error reporting in some form (save error to file or something)?

I would be interested to find out as we are always looking for ways to speed up our RT programs.

     Rob
0 Kudos
Message 4 of 9
(4,740 Views)
Hello Rob!
 
Your best bet for logging errors to a file is to build a string out of the data and append it to a file.  The simply ftp to your RT target and look at that file.  Let me know if you need more information.  Have a great day!
 
Allan S.
National Instruments
0 Kudos
Message 5 of 9
(4,712 Views)
Yes, we've been doing it that way for years. I was just wondering if Arun had any such thing set up. It has to be one of the better diagnostic methods for RT systems.

     Rob
0 Kudos
Message 6 of 9
(4,709 Views)

hi all

Thanx for the reply. For logging error i just print the error on the monitor right now, but may be i will have to create a log file too, but some how i feel it is going to slow down the system further. can anybody give me opinion on this.

Thanx

Arun

 

0 Kudos
Message 7 of 9
(4,704 Views)
If you will always have a monitor attached, then that should be fine.

In all of our systems, we have a queue for the error messages and a separate loop running that saves any messages in that queue to a file (checks for new messages every 10 seconds or so). We don't have a monitor connected to the PXI. We have the user interface on a computer (remote from the test rack) that talks to the PXI via TCP. So, saving to file was our best method of catching all the errors.

I take it then that you are not seeing any errors show up, but the PXI still seems to be really slow. In this case you may want to dump more messges to the monitor (loop started, etc.) to see what is actually happening and see what is taking too long.

     Rob
0 Kudos
Message 8 of 9
(4,696 Views)

I would say that the issue you are seeing is due to the DAQmx driver waiting to be fully loaded. KnowledgeBase 3JSH9ISU: Why Is My Executable Not Running As a Startup Application in an RT Target? discusses the issue and DAQmx 7.4 was fixed to make sure that it was fully loaded. There isn't a way to make it load faster but you could make all of your application starts at the same time by having it perform a DAQmx operation first and then using dataflow to start everything after it has completed. That would make sure the driver is loaded and everything is ready to go.

Regards,

JR A

0 Kudos
Message 9 of 9
(4,693 Views)