Discussion:
DeviceNet .dll firmware integration into Labview
(too old to reply)
Nadsokor
2007-03-19 13:40:13 UTC
Permalink
Hello all,
 
i have been charged with integrating DeviceNet on our new calibration system. Unfortunately, the company acquired a DeviceNet interface module from a vendor that does not include Labview interfacing VIs. I am therefore experiencing quite a lot of trouble integrating the firmware .dll. The vendor told me that it will take a while before they can help me.
 
I have succeeded at running some of simplest commands from the header file (ie open and close Api). However, more complicated commands, such as searching for nodes on the network, and explicit messaging are not working. This seem to be mainly caused by the way i input structures into the call library function node.
 
Can anybody tell me how to structure my inputs for these functions?
 
included are the header, the .dll and my own (clumsy) attempt at making the vi to call the functions.
 
thank you for your help
 
  Message Edited by Nadsokor on 03-19-2007 08:16 AM


DeviceNet.zip:
http://forums.ni.com/attachments/ni/30/2453/1/DeviceNet.zip
Posse
2007-03-20 09:10:08 UTC
Permalink
Hi Nadsokor,
 
I have looked at your VIs, and I can see that some of your input data to the Call Library Function Node is not of the exact data type that is expected, but I am unable to tell, if it is causing your problems. If you look at Start Device.vi, you will see that the two first inputs are U8 and I32, and you are inputting I8 and I16. You may want to verify this throughout your VIs.
 
I am not entirely sure, what you mean by "structuring your inputs".
 
Best regards,
Nadsokor
2007-03-20 09:40:09 UTC
Permalink
Yes, you're right. Those inputs are not exactly what is expected.  However, where i encounter the most seriuos problems (up to and including Labview crashing) is when i have inputs consisting of structures defined in the header  file. One example is the GetNodeList method, which expects a pointer to a structure called TNodeList, defined as:
 
typedef struct
{
 
BYTE byCount;
TNodeDesc NodeDesc[64];
 
} TNodeList;
 
where NodeDesc[64] is an array with 64 entries where each entry consist of the following structure:

 
typedef struct
{
 
BYTE byMacId;
WORD wVendorId;
DWORD dwSerial;
 
} TNodeDesc;
 
I am unsure how such structures are defined in LabView for the "call library function" node.
 
regards,
 
Marc Fornes-Mora 

Loading...