11-13-2019 07:30 AM - edited 11-13-2019 07:35 AM
I am an absolute beginner and trying to work with USB 6501 and vb.net
I want to use a digital output to switch a resistor to an existing one in parallel. Please see the attachment.
MyVB code:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim OUT() As Boolean = {True}
myUSB6501Task = New Task
'Create a virtual channel
myUSB6501Task.DOChannels.CreateChannel("Dev3/port0/line0", "", ChannelLineGrouping.OneChannelForAllLines)
myUSB6501Task.Control(TaskAction.Verify)
Dim SYS1OUT As New DigitalSingleChannelWriter(myUSB6501Task.Stream)
SYS1OUT.WriteSingleSampleMultiLine(True, OUT)
END Sub
It does not work and I do not know why.
I am grateful for every hint.
Thanks
Lois
11-14-2019 08:18 AM
I would suggest looking at the example:
C:\Users\Public\Documents\National Instruments\NI-DAQ\Examples\DotNET4.0\Digital\Generate Values\WriteDigPort\VB
11-18-2019 01:12 AM
thanks for the example, I did it like this. I see no difference.
Regarding hardware, could anybody have a look at my attached pic?
How to wire this? Does the USB6501 work like a switch (without voltage) or is a voltage output directly?
11-18-2019 08:16 AM
Did you read the manual for the USB6501?
It is a DIO device .
12-12-2019 08:12 AM
yes, sure. I just wanna use it as apure DO.
12-12-2019 08:52 AM - edited 12-12-2019 08:54 AM
As I wrote in the earlier post, you should look at the example program NI installs.
12-12-2019 09:00 AM - edited 12-12-2019 09:00 AM
i don't think that it is a software problem than more a hardware issue. What do you say to my pic posted earlier? Is this ok? I am not a hardware guy 😉
12-12-2019 09:02 AM
when I measure resistance between P0.0 and GND, do I measure "endless Ohm" in case of not swithcing and "zero Ohm" in case of switching the output of NI device?
12-12-2019 09:03 AM
or does a voltage come out (e.g. 5V when switched and 0V when not switched)?
12-12-2019 09:39 AM
Can't help you any further.
Find someone at your employer to help.