10-29-2021 10:53 AM
Hi,
I want to implement my DAQ hardware into my DQHM design and for that, I need to initialize my hardware. Normally, I do it like this:
But here, I have to use a string for my "HW refnum" (this example is from the CML DQHM example). I don't understand how to do that.
Would someone please be so kind as to enlighten me?
Thank you
mw42
10-31-2021 04:00 PM
We cannot help with what we cannot see. Instead of attaching a picture (very tiny type) of a small (and possibly irrelevant?) part of your DQMH, please compress the Folder that contains your LabVIEW Project and attach the resulting .zip file, along with a note telling us where to find the code you want us to examine.
Bob Schor
11-01-2021 07:06 AM
Hello Bob,
thank you for your reply. I do apologize for my previous post with so little usable information.
Please find attached a .zip file containing both the "CML DQHM Project" and the VIs with my usual "acquire data from cDAQ" code.
To specify the problem: There are a couple of VIs in the CML DQHM project folder (Modules -> Acquisition.lvlib -> HW calls) where I need to initialize my real hardware (see picture below):
The "Initialize Hardware References.vi" looks like this:
My code uses the "DAQmx Create Task.vi" and the output is of type "DAQmx event".
I already placed my code in several Sub-VIs so I would be able to implement those in the "Initialize Hardware Reference.vi". But how would I do that while the refnum type being "String" instead of "DAQmx task"?
Please find all necessary code attached. I do hope that I was able to clarify my problem.
Thanks
11-01-2021 01:26 PM - edited 11-01-2021 01:28 PM
I went ahead and implemented my code but I get an error:
I attached the project with my changes, also here is what I changed in two modules:
1) In the "acquisition.lvlib > HW Calls > Initialize Hardware References.vi"
2) In the "acquisition.lvlib > HW Calls > Acquire.vi"
Note: The SubVI in the error message is this one here (with the number 5 in the label)