01-03-2008 07:31 PM
01-04-2008 11:26 AM
01-07-2008 03:55 AM
01-07-2008 09:30 PM
01-08-2008 03:39 PM
Hello,
The I/O Testing code is continuously looping. The code that is being looped consisting mainly of two simple sub VIs (Input.vi and Output.vi) called repeatedly for each line of several ports. I have one side question … if you are using a NI 6515, which only has 32 lines, where are you getting eight different ports? Or are you reading from four ports and then writing to the same ports? Please confirm if this is the case or if you have more than one NI 6515. The sub VIs you are calling start by initializing the digital task then reading or writing to the line and last clearing the task.
The fact that you are looping code that is creating and ending several tasks is what is slowing you down and taking up resources. Please look to some of National Instruments shipping examples in the Example Finder. The examples that coincide with your sub Vis are “Read Dig Chan.vi” and “Write Dig Chan.vi”. Please note how they first create, start, looping only the read or write, and then close the task. This structure only creates one task while the VI is running. This structure could be multiplied to accommodate the number of lines/channels you are working with, where each line only has one task created for the entire time the VI runs overnight. I hope this information is helpful.
01-08-2008 06:48 PM
01-10-2008 08:46 AM
Hello,
Yes, the DAQmx Clear Task VI does release the resources; however this method of execution will still slow you down bases on the high number of task calls in one loop and the fact that you are running the program for a prolonged period of time.
01-10-2008 06:32 PM