08-04-2025 04:15 PM
Hello,
I have been using an old PC-DIO-24 card in an old Windows PC, with ISA slots, running Windows 2000. This was to control external hardware for procedures form Audio Precision software APWin Basic, which is similar to VBA.
The old PC recently failed and I am trying to port over the calls from the procedures I have written in APWin Basic. I have installed a PCI-6503 card in a PCI slot in the new PC, running Windows 11 Pro.
I installed NI-DAQmx and I can control the PCI-6503 from the test panel so I know the hardware is working.
I am having difficulty understanding how to control the hardware from inside APWin Basic.
I can provide more details if necessary.
Thanks,
Geoff
08-05-2025 12:05 AM
@GeoffPeters wrote:
Hello,
I have been using an old PC-DIO-24 card in an old Windows PC, with ISA slots, running Windows 2000. This was to control external hardware for procedures form Audio Precision software APWin Basic, which is similar to VBA.
The old PC recently failed and I am trying to port over the calls from the procedures I have written in APWin Basic. I have installed a PCI-6503 card in a PCI slot in the new PC, running Windows 11 Pro.
I installed NI-DAQmx and I can control the PCI-6503 from the test panel so I know the hardware is working.
I am having difficulty understanding how to control the hardware from inside APWin Basic.
I can provide more details if necessary.
Thanks,
Geoff
You found a computer with native PCI slot and can run Win11 Pro? please share details, will be helpful for many.
On the other hand, assuming APWin Basic is a variant of Visual Basic, please refer to DAQmx Base Programming in C#, VB .NET, and VB 6.0 - NI
In short, you need to import the DAQmx C-DLL in APWin Basic and call the functions.
08-05-2025 12:13 AM
See Using NI-DAQmx in Text Based Programming Environments and Getting Started with NI-DAQmx for Text-Based Programming for help files and examples.
08-05-2025 10:02 AM
Hello santo_13,
The PC is a Dell 7070 Tower which I purchased as a reconditioned unit from Amazon. It does have one PCI slot and the CPU is an i7-9700K.
Thanks for the clues. Please see attached for the snippets of the syntax I was using previously. (APWin Basic.rtf)
I also see the ANSI C example but I'm unclear how to implement it in the APWin Basic procedure. The steps are clear for C but...
Thanks,
Geoff
08-05-2025 10:03 AM
ZYOng...
Thanks for the pointers, I'll take a look at them a bit closer.
Geoff
08-05-2025 10:08 AM
Microsoft CoPilot seem to be able to shed some light and examples on using DAQmx in APWin Basic, have you tried the examples from ChatGPT or other AI tools?
08-05-2025 11:08 AM
Great tip! I'll see where that leads me.
08-05-2025 02:22 PM
santo_13,
Well, ChatGPT was of some help but I'm stuck.
I cannot find the .dll to include in my procedure. I have searched for DAQmx.dll and nidaqmx.dll. I did find some files with those prefixes but they all have other specifiers in their names.
I tried writing a test procedure but it looks as though without the .dll I can't move forward... or?
ChatGPT suggests:
DECLARE FUNCTION DAQmxCreateTask (taskName AS STRING) AS LONG
DECLARE FUNCTION DAQmxCreateChannel (taskHandle AS LONG, channelName AS STRING, nameToWrite AS STRING, terminal AS LONG) AS LONG
In APWin I believe the Declaration statement must be replaced with Public to make the functions global.
Public FUNCTION DAQmxCreateTask (taskName AS STRING) AS LONG
PublicFUNCTION DAQmxCreateChannel (taskHandle AS LONG, channelName AS STRING, nameToWrite AS STRING, terminal AS LONG) AS LONG
What is odd is when I try to run the procedure, The first line executes with no complaint but the procedure hangs at the second line. I tried changing the data types to ones used by APWin Basic with no success.
That's it at this point.
08-05-2025 02:48 PM
I did find the wrapper: 'niDAQmxBaseWrapper.dll' .
I have included that but my procedure still hangs at the second line.
08-05-2025 09:45 PM
Since APWin Basic is from AudioPrecision, have you tried reaching out to them on how to call a C-DLL in their version of language?