DAQFactory and Advantech PCI-1761


Recommended Posts

Hello. I bought Advantech PCI-1761 data aqusition card and I would like to collect data with Your DAQFactory. Can You tell me is that possible and how to do it?

I asked the same question on Advantech forum and they said that I check with You if Your software is compatible with DLL that comes with PCI-1761 card. Thank You very much for Your reply.

Haki

Link to comment
Share on other sites

We don't have a driver for it directly, but you can use the extern() statement to load their DLL and communicate with the card that way. The extern() statement is described in the user's guide under Extending DAQFactory -> Calling and External DLL.

Link to comment
Share on other sites

Hi.

I have another question. I looked in the DAQFactory User manual but I didn't find anything about defining data structures, for example like in C with typedef struct. Is there something similar in DAQFactory? Functions that are defined in my cards .DLL have method parameters that are structures so that is the reason that I am asking this.

Thanks for Your answer.

Cheers

Link to comment
Share on other sites

You probably won't be able to do it then. DAQFactory has a structure, or really a class, but its not like C because there are only two data types, double and string. So, you can't really pass it. The only way you could get this to work would be to tell DAQFactory you want to pass an array of bytes the exact size of the structure, then fill this array manually using the To. and From. functions. This is very feasable if you know what you are doing, but if you don't understand byte alignment, ordering, and generally the way C stores its structures, you'll have problems.

The other way to do it is to wrap their DLL in your own DLL that doesn't use structures for the API, and then form the structures in C. You could either have your API take more parameters, or take an array of doubles that you then put in the structure.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.