Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

VB.net How to Reset Device Like VB6

Solved!
Go to solution

Hi,

 

Can anyone tell me how to reset my PCI-6220 in VB.net code. I have it working in VB6 using the following code but can not find the same commands in VB.net. The program is written for shop floor people and if readings do not come in at the desired time I them to be able to reset the card rather than using MAX (Measurement & Automation). Thanks in advance

 

Private Sub CommandReset_Click()
    'Stop and Clear The Task Here
    DAQmxStopTask taskHandle
    DAQmxClearTask taskHandle
    'Reset Device
    DAQmxResetDevice "Dev1"
    taskIsRunning = False
End Sub

0 Kudos
Message 1 of 3
(7,290 Views)
Solution
Accepted by topic author Antony_Australia

Hi Antony_Australia,

 

There is a .NET reset function that can be accessed. 

 

Try this:

DaqSystem.Local.LoadDevice("Dev1").Reset()

 

Where Dev1 is the device name.

 

Hope this helps!

Chris T.
0 Kudos
Message 2 of 3
(7,280 Views)

Thanks Excellant Solution!

0 Kudos
Message 3 of 3
(7,274 Views)