Differences

This shows you the differences between two versions of the page.

Link to this comparison view

mgl:functionreferencedigio [2014/05/28 19:49]
mgl:functionreferencedigio [2014/05/28 19:50]
Line 25: Line 25:
 </​code>​ </​code>​
   -Follow the instructions [[:​mgl:​functionreferencedigio|above]] to compile mglDigIO and related functions.   -Follow the instructions [[:​mgl:​functionreferencedigio|above]] to compile mglDigIO and related functions.
-  -You should connect your input and output digital lines to the proper port and lines on your NI card that you want. Note that by default mglDigIO is set up to write to port 2 and read from port 1 of your NI card (but you can configure this when you run the mglDigiO('​init'​) command. You should reference your manual for the pinouts on the board you use. For the NI-6501 see [[http://​zone.ni.com/​reference/​en-XX/​help/​370466V-01/​device_pinouts/​6501pinout/​|here]]. We usually connect one digital input to: Pin 1 (black, digital ground) Pin 16 (red, port 2 input bit 0) and one digital output to: Pin 32 (black, digital ground) and Pin 27 (red, port 1 output bit 0).+  -You should connect your input and output digital lines to the proper port and lines on your NI card that you want. Note that by default mglDigIO is set up to read from port 2 and write to port 1 of your NI card (but you can configure this when you run the mglDigiO('​init'​) command. You should reference your manual for the pinouts on the board you use. For the NI-6501 see [[http://​zone.ni.com/​reference/​en-XX/​help/​370466V-01/​device_pinouts/​6501pinout/​|here]]. We usually connect one digital input to: Pin 1 (black, digital ground) Pin 16 (red, port 2 input bit 0) and one digital output to: Pin 32 (black, digital ground) and Pin 27 (red, port 1 output bit 0).
   -Run mglDigIO('​init'​) and you should see the following:<​code>​   -Run mglDigIO('​init'​) and you should see the following:<​code>​
 >> mglDigIO('​init'​) >> mglDigIO('​init'​)