08-15-2013 09:50 AM
Hello!
I am working on a system of tomography for my studies. I already posted about this on this forum but I have a new question.
Indeed, I have to control switches of a multiplexer and demultiplexer I am designing on analogue electronics. So I would like to send bytes from Labview on the ELVIS board to control these switches.
I find how to send a boolean through the Digital I/O of the board but i don't manage to send a byte (0 or 1). I imagine I have to use the DAQ Assistant (I don't see other solution) but when I choose one of the Digital I/O, Labview accept only boolean. So maybe I misundertood the Digital I/O or how to use the DAQ Assistant.
I thank you in advance for your answer. Best regards.
Mathieu Gauquelin, french student
08-15-2013 10:16 AM
Hopefully we can help you get started with DAQmx. We have many example VIs in LabVIEW that show you how to get started with the different measurement and generation types. If you click (in LabVIEW),
>> Help (in the menu bar)
>> Find Examples
>> Hardware Input and Output
>> DAQmx
>> Digital Output
open the "Digital - SW-Timed Output.vi" example. You should choose the digital lines from your ELVIS II+ board and then run the VI.
If you open the block diagram, you can see how one would code this up with our DAQmx API.
Let me know how it goes!
PS, if you still want to use the DAQ Assistant you can. It is a tool for new customers that are not familiar yet with our driver API. You should be able to run the DAQ Assistant with the dialog open as well as clicking OK then running the VI that houses the Assistant. You could put it in a while loop, for instance, and send a different boolean value (or array of values like the example above if you configure it to write a "port").
-gavin
08-16-2013 04:47 AM - edited 08-16-2013 05:16 AM
Hello.
I thank you for your fast answer. I don't find this example, maybe because I am on Labview 2010? I have only Digital Generation, Handshaking and Measurement as file.
The DAQmx boxes seem very complicated so I think I will need time to understand how it is working. So are you sure it is the good solution? I have 48 switches to control, but the half of them are the opposite value in input of the other half. So I think I will need the 24 Digital I/O and use on the board inverters and have like this my 48 controls. It is also difficult because I have to send these bytes not at the same time, so not in a synchronous way.
And can we use in the same time the DAQ Assistant and the DAQmx boxes?
Again thank you for your help, I appreciate very much.
08-16-2013 05:57 AM
And how many bytes can we send by only one port, for example the DIO 0 which is the line 0 to port 2?
09-05-2013 04:54 AM
I fix my problem.
So thank you for your help 😄
Best regards.
GAUQUELIN Mathieu