Editing Instrument control package
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 7: | Line 7: | ||
{| class="wikitable" style="text-align:center" | {| class="wikitable" style="text-align:center" | ||
|- | |- | ||
! !! Linux !! | ! !! Linux !! Windows (Cygwin) !! Windows (native) !! FreeBSD !! Mac OS X | ||
|- | |- | ||
! Serial | ! Serial | ||
Line 17: | Line 17: | ||
! i2c | ! i2c | ||
| bgcolor="green" | v0.1.0 || - || - || bgcolor="skyblue" | stalled || - | | bgcolor="green" | v0.1.0 || - || - || bgcolor="skyblue" | stalled || - | ||
|- | |- | ||
! spi | ! spi | ||
Line 70: | 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"> | ||
#!/bin/bash | #!/bin/bash | ||
# fake_linux_gpib.sh, Kire Pûdsje, Dec 2017 | # fake_linux_gpib.sh, Kire Pûdsje, Dec 2017 | ||
Line 106: | Line 103: | ||
#cleanup | #cleanup | ||
rm -f ${NI_DEF_FILE} | rm -f ${NI_DEF_FILE} | ||
</ | </source> | ||
== MacOS == | == MacOS == | ||
Line 471: | Line 468: | ||
# Convert uint8 array to string, | # Convert uint8 array to string, | ||
char(data) | char(data) | ||
# close | # close usbtmc session | ||
vxi11_close(t0) | vxi11_close(t0) | ||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | }} | ||
=== Limitations === | === Limitations === | ||
For now, | For now, | ||
Line 509: | Line 505: | ||
instrhwinfo will display the avilable devices in the system | instrhwinfo will display the avilable devices in the system | ||
{{Code| | {{Code|GPIB example|<syntaxhighlight lang="octave" style="font-size:13px"> | ||
instrhwinfo("spi") | instrhwinfo("spi") | ||
}} | }} | ||
Line 519: | Line 514: | ||
Example opening an performing IO on a device /dev/spidev0.0. | Example opening an performing IO on a device /dev/spidev0.0. | ||
{{Code| | {{Code|GPIB 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 529: | Line 524: | ||
# close the device | # close the device | ||
clear spidev | clear spidev | ||
}} | }} | ||
[[Category:Octave Forge | [[Category:Octave Forge]] |