LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting error in call library node when establishing communication with MAX1452 on serial port using dll

I want to communicate with MAX1452 in labview on PC serial port. Maxim provides dll file which has functions to communicate with device.It says first two functions should be findcom port and initialization sequence where findcom port returns PC's serial port address while initialization sequence helps device to learn baud rate.Iam not getting exception error in call library node.i have kept dll file in the same location as VI.

0 Kudos
Message 1 of 11
(4,323 Views)

Can you pleae attach the dll? did maxim provide labview code too? if yes attach them too. I have my maxim board.  I will check it and I can help you.

0 Kudos
Message 2 of 11
(4,278 Views)

Hi Dbase,

 Maxim doesn't provide labview code. i have dll file. forum doesn't allow to attach dll file. how to do that.. What type of board do you have? are you using own code ?......

0 Kudos
Message 3 of 11
(4,256 Views)

Is it a C/C++ dll? You can go through the following links for information on how to call external DLLs from LabVIEW:

 

http://zone.ni.com/devzone/cda/tut/p/id/2719

 

http://digital.ni.com/public.nsf/allkb/DCB90714981A1F148625731E00797C33

 

0 Kudos
Message 4 of 11
(4,243 Views)
Its a c dll.
0 Kudos
Message 5 of 11
(4,228 Views)

Can you post the labVIEW code that you are using? Also, I would like to know the version of labVIEW you are using and the OS you are using it on.

 

A few things that you can check if you haven't done so already:

-Verify that the data types of input and output parameters match those expected by the functions inside dll 

-Make sure you have given the correct path of your dll file in the Call Library Function Node.

-Set the error checking level to 'maximum' under the configure>error-checking tab of the function node to see if you can get some useful information about the error you are getting.

0 Kudos
Message 6 of 11
(4,206 Views)

Labview verison is 7.1 and os is win xp.

 

The data types are according to the dll functions defined in functions definitions( attached previously).

I'd put dll in the same directory where the code resides.

 

0 Kudos
Message 7 of 11
(4,190 Views)

Hello LabByte,

 

There seem to be a few issues with serial.dll and winXP regarding accessing serial ports according to a post at a Maxim forum. It might help if you check with Maxim once regarding this.

 

Alternatively, you can try using VISA to configure serial port access instead of the findcom-port routine and thus prevent the error from occuring.

 

 

 

 

0 Kudos
Message 8 of 11
(4,156 Views)

I think the link was incorrect in my previous post. You can try this.

0 Kudos
Message 9 of 11
(4,143 Views)

Thx for the efforts. Did you see the code, It crashes labview? is it related to data handling as the function findcomport is supposed to receive port address which is 16 bit unsigned integer. I have connected the function output directly to a 16 bit unsigned numeric indicator.Do i have to put in between something.......as it is serial data........

0 Kudos
Message 10 of 11
(4,131 Views)