LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LV FPGA dll call from C++ application

Hi all,

 

I have developed a LV FPGA dll which I call in a C++ application from a command console in windows. During the operation various update messages are posted to the console using std::cout. This all works really well. I now want to pipe all this info to a file and this is where it doesn't work well. The log file is always empty. I've tried a bit of debug and found that the application will pipe to file so long as I don't call the function that creates the FPGA reference, but as soon as I call the create FPGA reference function all piped messages are lost. Anyone got any ideas why this is happening?

Thanks,

Nick

0 Kudos
Message 1 of 4
(2,283 Views)

Hi Nick,

 

I'm sorry to hear you're having this problem, I just have a few questions for you:

What version of LabView are you using?

Could you upload a small amount of example code?

What vi's are you using to log to file?

 

Here is a knowledge base article that I believe could help solve the issue:

 

Why Does My LabVIEW FPGA Host Interface DLL Not Interface with My FPGA Target?

https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kJIpSAM

 

Kind regards,

Jaimie

0 Kudos
Message 2 of 4
(2,236 Views)

Hi Jaimie,

 

Thanks for the response. I'm using LV & LV FPGA 2015. I don't have a cut down version of the code at this time. There are no logging vi's used in the app. The C++ app is posting messages to the cmd console using the std::cout command and I am using the windows pipe stdio to file switch when calling the C++ app from the command line. I had a quick look at the KB and it's not quite describing what I'm experiencing but what is interesting is that when I compile the LV code into the dll I do not get the support directory or the lvalarms.dll created. I wonder if this is something fairly recent and does not happen in LV 2015?

 

Thanks again,

 

Nick

0 Kudos
Message 3 of 4
(2,233 Views)


Hi Nick,

I have come up with a couple of suggestions for us to try in order to solve the issue, these will help to narrow down the root cause of the problem:


1) As we do not support C++ we would not be able to help with this, although here are some examples created by us that definitely work with FPGA, try the appropriate example, as this will help to show whether the code is causing the issue. Examples -FPGA Interface C API Help


2) I would also like to check you have included all the necessary code to run with FPGA. For example: Are all the necessary header files referenced first? See Programming with the FPGA Interface C API 

 

Please let me know if either of these processes help with the issue.

 

If you could upload some example code, this will enable me to understand the problem in more detail.

 

Thanks,

Jaimie

0 Kudos
Message 4 of 4
(2,218 Views)