From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DeviceNet loading driver issues

I got a DeviceNet driver from Mks instruments. I am currently using DeviceNet module from Molex (USB to DNet). I am using the drivers provided my MKS, edited them in Labview to work for Molex USB to Dnet Module. When I put the Labview program into a different computer, it gave me an error saying that the driver is not loaded!. Later I figured out that you have to type in the directory of the .dll file manually, which I did. Now it loads driver sucessfully but now it comes up with an other error, " The driver is already loaded!." Thie error line goes all the way down not allowing me to communicate with the DNet module. Hopw can I get pass this error. 

 

I have attached some screenshots to help you guys out with what I problems I am facing. I had to type in "ssdn32.dll" manually into a string and feed into the Load VI to load the driver. Now I did some runs to see whats going on. This is what I got till now

 

1. When you type in "ssdn32.dll" manually into a VI and apply changes and run the main.vi. This error comes up, " the driver is not loaded."

2. When I type in ssdn32.dll manually, apply changes, run the load Vi independently first and then run the main VI, this error comes up, " The driver is already loaded!". 

 

 

Labview Learner
Download All
0 Kudos
Message 1 of 6
(3,608 Views)

The reason you're getting different behavoir is that the "Driver Name" input of the loaddriver VI is not connected to anythin in main.vi.  This means when loaddriver.VI is run (with ssdn32.dll in the Driver Name front panel control) you'll run the "False" case of the interior case structure.  When loaddriver.vi is called from main.vi with nothing wired to the "Driver Name" input, the loaddriver runs with "Driver Name" blank and executes the True case of the interior case structure.  Wire the driver name to loaddriver.vi in main.vi and you should get consistent operation, even if it's not (yet) correct. 

 

Try putting an indicator or a probe on the wire coming out of the loaddriver.vi interior case structure (going to the "call library node") to see if the path to the DLL is valid and expected.

 

What happens if you ignore the "already loaded" error message and continue with the rest of the program?

0 Kudos
Message 2 of 6
(3,581 Views)

Hi Ashiaironix,

 

Is it possible if you can provide the LabVIEW code you have for the DeviceNet on this post? I have a similar task to communicate to a DeviceNet using the SST-DN4-USB interface adapter.

 

Thank you,

Ed

0 Kudos
Message 3 of 6
(3,091 Views)

Hi All,

I will be lucky if I will get the LabVIEW code that I was requesting. Instead, I created my own LabVIEW project for the DeviceNet application interfacing with the Molex SST-DN4-USB. I have made a lot of progress except on the last function that retrieves the message from the connected DeviceNet device. I have attached the following images and I am hoping someone will help find the problem with what I am seeing. The last function I am calling is the "DNS_ReceiveDeviceExplicit". The explanation from the DLL document about this function is attached (ReceiveDeviceExplicitFunction.jpg). The LabVIEW VI that I created is "ReceiveDeviceExplicit_Vi.jpg). The reference I have for a sample C code is "ReceiveDeviceExplicit_C_code.JPG". The error that I am getting is "Invalid data buffer size". Can anyone help me how to convert Size=sizeof(ServiceData) into my LabVIEW vi? Is this what is causing the invalid buffer size error? I am expecting the message response to be the ServiceData which is I am displaying on the my main vi as Response Message (Main_Vi.jpg). Any help is much appreciated.

 

0 Kudos
Message 4 of 6
(3,061 Views)

Hi Rebelas,

 

I noticed that Ashaironix has not posted in around two years so it may be best to create a new post with this question.  Creating a brand new forum post will also enable more community members to view your question.

 

-cblanchard

0 Kudos
Message 5 of 6
(3,024 Views)

What's the latest on the SST-DN4-USB? It looks like I would use the dnscan32.dll, as described in

5136-DN/5136-DNP, DeviceNet Scanner Module / 32-Bit DLL API, Reference Guide, Version 2.21.

 

Does this work? Are there LabVIEW VIs available for this? How many man hours did it take to get it working?

Thanks,

Chris C.

0 Kudos
Message 6 of 6
(2,520 Views)