Instrument control package: Difference between revisions

Jump to navigation Jump to search
m
→‎Windows (cygwin): Avoid deprecated "source" tags.
m (→‎Windows (cygwin): Avoid deprecated "source" tags.)
(One intermediate revision by one other user not shown)
Line 67: Line 67:
To be able to use GPIB on windows, the linux-gpib library needs to be 'faked'. This can be done by copying the following script and run it in a bash-terminal.
To be able to use GPIB on windows, the linux-gpib library needs to be 'faked'. This can be done by copying the following script and run it in a bash-terminal.


<source lang="bash">
<syntaxhighlight lang="bash">
#!/bin/bash
#!/bin/bash
# fake_linux_gpib.sh, Kire Pûdsje, Dec 2017
# fake_linux_gpib.sh, Kire Pûdsje, Dec 2017
Line 103: Line 103:
#cleanup  
#cleanup  
rm -f ${NI_DEF_FILE}
rm -f ${NI_DEF_FILE}
</source>
</syntaxhighlight>


== MacOS ==
== MacOS ==
Line 505: Line 505:
instrhwinfo will display the avilable devices in the system
instrhwinfo will display the avilable devices in the system


{{Code|GPIB example|<syntaxhighlight lang="octave" style="font-size:13px">
{{Code|SPI example|<syntaxhighlight lang="octave" style="font-size:13px">
instrhwinfo("spi")
instrhwinfo("spi")
</syntaxhighlight>
}}
}}


Line 514: Line 515:
Example opening an performing IO on a device /dev/spidev0.0.
Example opening an performing IO on a device /dev/spidev0.0.
   
   
{{Code|GPIB example|<syntaxhighlight lang="octave" style="font-size:13px">
{{Code|SPI example|<syntaxhighlight lang="octave" style="font-size:13px">
# open device
# open device
spidev = spi("/dev/spidev0.0", 'clockpolarity', 'idlehigh', 'clockphase', 'firstedge')
spidev = spi("/dev/spidev0.0", 'clockpolarity', 'idlehigh', 'clockphase', 'firstedge')
Line 524: Line 525:
# close the device
# close the device
clear spidev
clear spidev
 
</syntaxhighlight>
}}
}}




[[Category:Octave Forge]]
[[Category:Octave Forge]]

Navigation menu