04-29-2011 02:26 AM
Buongiorno a tutti!
Ho intenzione di utilizzare il dispositivo USB-6008, collegato via USB al PC, in quanto ho bisogno di acquisire 4 tensioni analogiche che andrò a leggere tramite un codice in Visual Basic ed a scrivere su file. Per questo, avrei bisogno di poter vedere il dispositivo come COM Virtuale. Ciò è possibile oppure si gestisce esclusivamente con LabView?
Grazie in anticipo,
Andrea.
04-29-2011 02:44 AM
Hello Andrea,
USB-6008 uses drivers which is called NI DAQmx. NI DAQmx allows you to use the same programming techniqe in different development environments. When you install NI DAQmx driver, be sure you install examples for Visual Basic as well (NI-DAQmx Examples for Visual Basic 6.0). They might be useful
See tutorial "Using NI-DAQmx in Text Based Programming Environments".
Regads,
Stefo
04-29-2011 08:54 AM
Thanks a lot,
Regards.
Andrea
04-29-2011 09:54 AM - edited 04-29-2011 09:55 AM
Hi,
I read the examples code for Visual Basic installed with NI DAQmx driver. One of them (called One Sample) acquire a voltage value and display it:
' Read in one sample from the analog input channel.
DAQmxErrChk DAQmxReadAnalogScalarF64(taskHandle, 10#, data, ByVal 0&)
If I would acquire more than 1 voltage (for example 3 inputs), which is the right way to distinguish them from each other? How can I select in VB the right channel?
Thanks a lot,
Andrea