Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How to ACQUIRE AI Signal and Drive Digital Output channel? Please reply me

Hello

 

I have just acquired Measurement Studio 2010 Standard edition and USB 6212 DAQ.

 

I should do this 2 action:

 

1) Acquire a signal from one channel

 

2) Turn On/Off Digital Output Pin

 

The language that I use in VB.net 2010

 

Please help me with working example or good working tutorial

 

Thanks

 

 

 

0 Kudos
Message 1 of 3
(2,802 Views)

This code should generate a waveform

This is my old code but don't work.

What I should change for use it now?

 


Dim MyTask_Dati_Out As New Task("Task_Dati_Out")
Dim Buffer As New AnalogSingleChannelWriter(MyTask_Dati_Out.Stream)

Vettore_Dati_Out = Array.CreateInstance(GetType(Double), 2, 200)

Try
'Creo il Task
MyTask_Dati_Out.AOChannels.CreateVoltageChannel("D

ev1/ao0", "", -10, 10, AOVoltageUnits.Volts)
MyTask_Dati_Out.AOChannels.CreateVoltageChannel("Dev1/ao1", "", -10, 10, AOVoltageUnits.Volts)
' Verifico il task creato
MyTask_Dati_Out.Control(TaskAction.Verify)
'Imposto l'oscillatore di Uscita
MyTask_Dati_Out.Timing.ConfigureSampleClock("", Oscillatore_di_Uscita, SampleClockActiveEdge.Rising.Rising, SampleQuantityMode.ContinuousSamples)
'Scrivo i dati nel buffer e parto
Buffer.WriteMultiSample(False, Vettore_Dati_Out)
'Inizio a produrre la forma d'onda
MyTask_Dati_Out.Start()
Catch err As DaqException
MessageBox.Show(err.Message)
MyTask_Dati_Out.Dispose()
End Try
0 Kudos
Message 2 of 3
(2,794 Views)

Can you see the following example? 

 

It is an example that shows how to continuously acquire analog input and analog output at the same time, synchronized with one another on the same device. You can use it as aguide to help you implement your project.

 

http://zone.ni.com/devzone/cda/epd/p/id/2352

Antonios
0 Kudos
Message 3 of 3
(2,773 Views)