From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Initializing and Closing of HW cards

Solved!
Go to solution

Hi,

 

 

Earlier in each test case I use to initialize the cards and then close the cards once test is completed. This i use to do for each test case. But I am thinking it is not proper way of programming to initialise and close the cards every time. I want to initialize all the cards once user logins and close all the cards once user logs off/exit. So, by doing this will it not affect my program or execution? or is there any better method?

 

 

Regards,

Rajashekar

0 Kudos
Message 1 of 7
(2,736 Views)

Hi Rajashekar,

 

Which HW cards are you referring to? can you name few of them?

 

Are you using teststand? 

0 Kudos
Message 2 of 7
(2,731 Views)

Hi,

 

 

I am not using Teststand but I am using LabVIEW 8.6 and the cards are PXI 5412, PXI 2532, PXI 6528, PXI 8431/8 etc,...

 

 

Regards,

Rajashekar

0 Kudos
Message 3 of 7
(2,726 Views)

When you want to continuously read or write through NI cards, its always recommended to to ebgin the task, finish your task and then close the task. and not continuously open and close the task references.

 

But if your application does hardware read/write performance once in a day or so, then you can think of closing the reference after the hardware read/write is finished. But still opening the task reference in beginning and performing read/write operation will cause no harm in this case also. 

0 Kudos
Message 4 of 7
(2,724 Views)

Hi,

 

 

Suppose if i am using waveform generator cards, what i want to do is i will initialize the card(open the device id) when the software is executed and perform all the operation in the tests (when user performs some tests) i.e. generating different signals of diff. amp. and freq. and abort generation in each test case and before user closes the software / after he logs off i will close all the cards.

 

It means i want to initialize all my cards and close all my cards only once in my software i.e. when software executes and before closing the software.

 

 

Regards,

Rajashekar

0 Kudos
Message 5 of 7
(2,715 Views)
Solution
Accepted by Rajashekar

Yes.

 

you can open the task ID at first and run the software, generate signals, close the ID/task when you quit the software. 

0 Kudos
Message 6 of 7
(2,712 Views)
Thank you very much..........
0 Kudos
Message 7 of 7
(2,707 Views)