LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Adding Support for New Hardware in LabView

Everyone,

 

We have a request to support one of our CAN PCI Mezzanine Cards (PMC) under LabView. This is not an NI Card. I am new to LabView and I am trying to figure out how to integrate this currently unsupported CAN card into LabView so that our customers can manipulate this device through the LabView interface. I would consider this to be somewhat a 3rd party device/driver integration into LabView. I went through few of the webcasts but was not able to get specific info on what needs to be done with LabView to get this hardware supported and what tools we would need to purchase to do this development and testing. Even though we would need to test our hardware from an end user perspective, our objective here is to get our hardware integrated into LabView and be useable as a standard CAN device. Currently we only have a windows XP driver for this CAN hardware.

 

0 Kudos
Message 1 of 9
(1,605 Views)

What is your current driver?  LabVIEW can call multiple types of other code, such as DLL's, ActiveX, .NET, etc.

 

The option you probably want to go with is to write a LabVIEW wrapper around the driver you currently have.  There could be some issues if you have any complex data structures in your driver, as LabVIEW can have some problems.  In this case, you may need another LabVIEW friendly wrapper to handle these issues.  LabVIEW is most likely capable of doing the direct communciation with your hardware, but then you would have to maintain two versions of your driver.  Using the wrapper method, as long as the calling method doesn't change, your LabVIEW driver can remain unchanged.

 

At a minimum, you would need to purchase LabVIEW.  You can get a 30-day demo to play with if you wish.  You may wish to consider hiring someone to do the driver for you.  NI has numerous Alliance members (including myself) with very qualified people on staff.  If you have no experience using LabVIEW, this could take you sometime to figure out, especially if you want a quality driver to deliver to your customers.  Depending on the complexity of your driver and the number of functions required, they could have the driver ready for test in a couple of days.

 

 

0 Kudos
Message 2 of 9
(1,599 Views)

Hi Matthew,

 

Currently we have a windows WDM driver. I am not sure whether the interrupt and DMA implementation in WDM driver can be used directly by the LabView RT environment. We have a DLL project that goes along with it. DLL project is written in VC++. As far as I can tell there is no .Net involved in the demo program. We are seriously considering using external consultants for this work.

 

One other question is regarding CANOpen Library. I see that NI cards support CANOpen library. Is there a way to use CANOpen Library to control our custom PCI CANBus Hardware? I am assuming CANOpen library provides the graphics blocks to control the CANBus devices without knowing the underlying CANBus device.

 

By the way, do you work for National Instruments?

 

Thanks for the reply.

 

Best Regards,

 

Boby

 

0 Kudos
Message 3 of 9
(1,577 Views)

Boby,

 

LabVIEW might be able to use the WDM driver, but should be able to use the DLL.  You mentioned LabVIEW RT.  Are you trying to get this to work in LabVIEW or LabVIEW RT (Realtime)?

 

I haven't played with the CANOpen library, but it appears they are indicating it is for NI hardware.  Looking at the documentation, it expects an NI hardware naming convention for intialization.  I'm assuming that the underlying code is calling DLLs, so it may not be possible to get the code to work for your hardware.

 

I do not work for NI, but I do work for an Alliance member.

 

Matthew

0 Kudos
Message 4 of 9
(1,565 Views)

Matthew,

 

I apologize. It is meant for LabView RT. I thought both are almost the same except the realtime behaviour for the RT version. Does it involve more porting if it is LabView RT?

 

Boby

0 Kudos
Message 5 of 9
(1,559 Views)

Boby,

 

It will get more complicated.  LabVIEW RT does not run in Windows, so you can't directly use your existing drivers.  I'm by no means an expert on LabVIEW RT, but I found this info on NI's website:

 

  1. Writing from scratch
  2. Using an existing driver
  3. other info

Hopefully somone else with more experience in the matter can chime in.  You may want to post another message specifically mentioning LabVIEW RT driver development and include a link to this discussion.

0 Kudos
Message 6 of 9
(1,550 Views)

Matthew,

 

Thank you for the reply. I will go through the links that you provided me. I also saw some webcasts on LabView RT on this site. I will also take a look at that. If I come across any other questions related to LabView RT, I will post it in the RT forum.

 

Thanks,

 

Boby

 

0 Kudos
Message 7 of 9
(1,538 Views)

Boby,

 

You MAY be able to directly call the DLL that you already have, even though it will be run on a non-windows RT system. Some DLLs are 'clean' C code and can be used. Other DLLs call into Windows libraries and cannot (not a windows OS, no windows libraries). It depends on the code that went into the DLLs.

 

I would like to offer our services to help you out with this. I work for DISTek Integration, Inc. We are an NI Alliance Member. We have experience creating LabVIEW drivers for other equipment manufacturers. We also have quite a lot of experience with CAN (particularly but not limited to J1939 / ISO-11783).

 

I think that this would be a good fit for us, so if you need some help, feel free to contact me.

 

Good luck,

Bob Young

 

 

0 Kudos
Message 8 of 9
(1,525 Views)

Thank You Bob. We are still working on the requirements with our end customer. Once we get enough information we will contact you.

 

Best Regards,

 

Boby

 

0 Kudos
Message 9 of 9
(1,516 Views)