Linux support update after NI's new driver support
Closed this issue · 9 comments
This support article from August says that now you can install NI-DAQmx or NI-DAQmx Base on Ubuntu. Does this mean that this package can be modified to work with a linux system?
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z00000159XISAY&l=en-US
"Q: I am running a computer with an Ubuntu operating system. Is NI-DAQmx or NI-DAQmx Base supported on Ubuntu?
A: As of the NI Linux Device Drivers 2020, NI-DAQmx is supported on Unbuntu 18.04. Prior to this version, NI-DAQmx was not supported on Unbuntu. Please see the NI-DAQmx for Linux 20.1 readme for a list of devices supported by the NI-DAQmx for Linux driver."
adding linux support to NIDAQ.jl would be great! unfortunately, i won't have access to a linux box until the mandatory work-from-home order for me is lifted. care to take a stab at it?
Seems like it shouldn't be too difficult. I'll give it a try.
When I was producing the Julia file with Clang (with DAQmx version 20.1), I got the following warning massages. Is there a way to work around this or is this fine?
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetTaskAttribute(TaskHandle, int32, void *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetChanAttribute(TaskHandle, const char *, int32, void *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxSetChanAttribute(TaskHandle, const char *, int32, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetTimingAttribute(TaskHandle, int32, void *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxSetTimingAttribute(TaskHandle, int32, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetTimingAttributeEx(TaskHandle, const char *, int32, void *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxSetTimingAttributeEx(TaskHandle, const char *, int32, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetTrigAttribute(TaskHandle, int32, void *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxSetTrigAttribute(TaskHandle, int32, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetReadAttribute(TaskHandle, int32, void *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxSetReadAttribute(TaskHandle, int32, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetWriteAttribute(TaskHandle, int32, void *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxSetWriteAttribute(TaskHandle, int32, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetExportedSignalAttribute(TaskHandle, int32, void *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxSetExportedSignalAttribute(TaskHandle, int32, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetScaleAttribute(const char *, int32, void *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxSetScaleAttribute(const char *, int32, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxSetBufferAttribute(TaskHandle, int32, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxSetSwitchChanAttribute(const char *, int32, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetSwitchDeviceAttribute(const char *, int32, void *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxSetSwitchDeviceAttribute(const char *, int32, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxSetSwitchScanAttribute(TaskHandle, int32, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetDeviceAttribute(const char *, int32, void *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxCreateWatchdogTimerTask(const char *, const char *, TaskHandle *, float64, const char *, int32, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetWatchdogAttribute(TaskHandle, const char *, int32, void *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxSetWatchdogAttribute(TaskHandle, const char *, int32, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetCalInfoAttribute(const char *, int32, void *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxSetCalInfoAttribute(const char *, int32, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetPhysicalChanAttribute(const char *, int32, void *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetRealTimeAttribute(TaskHandle, int32, void *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxSetRealTimeAttribute(TaskHandle, int32, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetPersistedTaskAttribute(const char *, int32, void *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetPersistedChanAttribute(const char *, int32, void *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetPersistedScaleAttribute(const char *, int32, void *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetSystemInfoAttribute(int32, void *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxSetDigitalPowerUpStates(const char *, const char *, int32, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetDigitalPowerUpStates(const char *, const char *, int32 *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxSetDigitalPullUpPullDownStates(const char *, const char *, int32, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetDigitalPullUpPullDownStates(const char *, const char *, int32 *, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxSetAnalogPowerUpStates(const char *, const char *, float64, int32, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
┌ Warning: Skipping VarArg Function CLCursor (CLFunctionDecl) DAQmxGetAnalogPowerUpStates(const char *, const char *, float64 *, int32, ...)
└ @ Clang ~/.julia/packages/Clang/g35ge/src/wrap_c.jl:15
Could you provide some help on the "manual edits" for constants_V<version>.jl
and functions_V<version>.jl
files for DAQmx version 20.1.0? As long as that's taken care of, I can add linux support and test it on a linux machine.
what error messages are you getting when you use the unaltered Clang output? those are the ones you need to address with manual edits.
the only errors I got are:
- the VarArg error posted above
- and at the precompilation time,
const CVICALLBACK = CVICDECL
(this was resolved by removing the line as instructed for the earlier version).
With DAQmx 20.1.0, I can successfully load the package on linux (Ubuntu 18.04). However, unfortunately, I can't test it with a device since it looks like that the Linux DAQmx doesn't support the lower-end USB DAQ boards. I currently don't have access to a non-USB board (hopefully NI will update to support the USB products in the near future).
Updates: back to work where I have PCIe-6321. I was able to make it work on Ubuntu 18.04 with DAQmx v20.1.0. See #28
@bjarthur Could you make a new release with the current master—which includes the recent linux support. When I made the linux support, I set the next version number to be 0.6.0
in the Project.toml
sorry! in progress: JuliaRegistries/General#26469