11-27-2013 04:32 PM - edited 11-27-2013 04:33 PM
I was given a daq. I hvae daqmx 9.2.2 installed. I would like to use matlab to do the following.
If detect digital signal iniput from port 0 line 0 (Sensor)
wait 100ms
send digital signal output to port 0 line 1 (LED)
wait 100ms
send the inverse siganl to port 0 line 1 (turn off LED)
Thanks
12-02-2013 09:24 AM
You should try contacting MathWorks directly as this will use their Data Acquisition Toolbox:
http://www.mathworks.com/products/daq/
http://www.mathworks.com/support/search_results.html?q=product:%22Data+Acquisition+Toolbox%22
Good luck!
12-05-2013 02:56 AM
Mathworks team is rather non responsive to my questions. So i'll stick with this forum XD.
Anyways.
I just want to know how to detect digital signals from port 0 line 1
and send digital signals fro port 0 line 2.
I am expecting something like this..
if digitalsignal.port[0] = true
sendsignal(digital;signal.port[1])
something along the lines
12-05-2013 03:22 PM
Well, this is how you can do it in LabVIEW!
You can download a trial version of LabVIEW here: https://lumen.ni.com/nicif/us/evallv/content.xhtml
You can download the DAQ drivers here: http://search.ni.com/nisearch/app/main/p/bot/no/ap/tech/lang/en/pg/1/sn/catnav:du/q/daqmx/
Good luck 🙂
12-05-2013 06:42 PM - edited 12-05-2013 06:43 PM
I do not want to use labview to do it. I want to use matlab(not simulink but matlab) to do it. Any ideas? anyone?
I just need that one line of code which is send/detect digital I/O
12-06-2013 09:45 AM
Originally, you were asking for LabVIEW code and you were given a couple of different solutions for your simple problem. You've apparently decided that LabVIEW is too complicated a language to learn. Now, you are asking about Matlab programming on an NI board. As you have been told, you need to go to Matlab and ask about programming in their language.
12-06-2013 01:27 PM - edited 12-06-2013 01:28 PM
^ Errr. that is not true. I figured out how to do it using labview, btu then my boss suddenly said "I have decided that it would be best to code this in Matlab, since it is the most widely used language among scientists. I hope that switching at this point won't be too much of a hindrance for you." so now I need to do it in matlab )=.