PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

Running LabVIEW code on a RT host pc

Hello,

 

I may be incorrect in my assumptions I have made from reading this post, but here is what I think your problem is and something you could try in order to solve this.  If I am correct in the assumption that your connection chain looks something like this:  Power Supply >> PXI Chassis >> Real-Time Machine >> Host (The PXI Chassis and Real-Time machine might be in the same box, or not, depending if you have a Desktop ETS System or not).  That being said, if this is the case, you might have to FTP the dependent dll's that you got from the manufacturer of the Power Supply to your Real Time system.  LabVIEW does not deploy all dll's down to the RT Machines, especially if you are using the "Call Library Function" block.  In that case you would have to FTP the dll's to the RT Machine.  The location of the dll will depend on the file location in that block, which should be set to something that exists on your RT Machine.  I hope this helped.  I have had some experience with custom DLL's in LabVIEW and RT Machines and it's somewhat of a headache.  🙂

 

Michael

-You can never have too much power...
0 Kudos
Message 11 of 19
(1,745 Views)

Hi Michael,

 

Thank you for the reply. You are right about the connection chain whereby the pxi chasis and real-time machine is in the same box. I am not really sure about how to FTP the dependent dll's to the RT Machine.

 

Also can you please further explain on the location of the dll which depends on the file location in that block?

 

Thank you.

 

Kind Regards,

Kieren

0 Kudos
Message 12 of 19
(1,734 Views)

Hey Andy,

 

Thank you for the suggestion. Yes, the DLL is written by the company that has created the hardware and it should be compatible with Labview. I will try contacting the company.

 

Thank you.

 

Kind Regards,

Kieren

0 Kudos
Message 13 of 19
(1,732 Views)

Well, there are a couple of ways to FTP files down to RT machines.  I'll briefly explain what they are and why I do or do not use them (I guess this is a sensei moment).  First you can use NI's FTP program which is in the DAQmx.  I do not use this because I find it difficult and not aesthetically pleasing.  Second, is good ole Windows.  You can open a Windows Explorer window and type in ftp://ipaddress> and that should take you to your RT machines root directory.  I use this for quick deployments, but I have had problems in the past when overwriting/replacing files because Windows and NI were caching the files and not actually transferring them.  Finally the method I use now is FileZilla.  It's a free program on the internet and its easy to use. 

 

Now onto the location.  Before I get too deep into the location, I have a few questions.  Assuming the DLL is making calls to the hardware directly and LabVIEW is just a wrapper for the DLL, are you using a "Call Library Function" block to call the DLL, or did the power supply company give you a subVI to put in your main VI to access the hardware?  I ask because based on where the function is being called will determine where the DLL needs to be located (if that makes sense).

 

Michael

-You can never have too much power...
0 Kudos
Message 14 of 19
(1,730 Views)

Hey Kieren,

 

There are some other options available. I mentioned in a previous post that you could do this through LabVIEW, well below is a link as to how to build your own driver that you may find useful. Alternatively you could take a training course in at National Instruments in Newbury which will teach you how to build these. If you need more information please just ask or visit our website.

 

Build you own drivers:

 

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

Regards

Andrew George @ NI UK
0 Kudos
Message 15 of 19
(1,726 Views)

I will download the FileZilla in abit, taking that I will need to download the FileZilla Client is 3.3.5. What does this program do exactly to the DLLs?

 

The manufacturer has provided subVI for each function e.g. generate voltage, frequency, etc which I put on my main VI. However, each of these subVIs block diagrams consist of the "Call Library Function" block to call the DLL. Thus, I assume I am using a "Call Library Function" block to call the DLL.

 

Kieren

0 Kudos
Message 16 of 19
(1,723 Views)

Hey Andy,

 

That is good idea of building my own driver. I will try practicing the tutorial. I will look into the training course which you have mentioned.

 

Thank you.

 

Kind Regards,

Kieren

0 Kudos
Message 17 of 19
(1,720 Views)

To answer your first question, FileZilla is a FTP (File Transfer Protocol) program.  So all it's going to do is put the file on the RT machine without changing the DLL at all.

 

Considering you were given a subVI the company probably is looking for the DLL in a specific location.  You can double click on the Call Library Function block in the SubVI and it should open a window that will tell you the location the DLL should be located.  More than likely that location will not exist on the RT machine (but if it does, FTP the DLL there), and if it doesn't exist, change the directory to something on the RT machine (ie. C:\ni-rt\system; C:\; etc.).  The directory you specify in that block is where the DLL should be put. 

 

Michael

-You can never have too much power...
0 Kudos
Message 18 of 19
(1,716 Views)
Hi Michael, I have tried doing so, doesn't seem to work either. I contacted the company. Apparently, I need IVI Compliance Package 3.3 and NI-VISA Runtime 4.4 on the PXI controller. These software are on my host pc. Using MAX, I tried to install these software. However, they are not available in the recommended softwares under the add/remove software window for the PXI. Does anyone know if there are other ways of installing these softwares from host pc to the pxi controller? Thank you. Kieren
0 Kudos
Message 19 of 19
(1,631 Views)