LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with the integration of a code into an FPGA VI

After my LV crash problem, which was successfully solved. I’m encountering another problem. I want to load data from a Yokogawa (DX112) datalogger into Labview. With this data I would like to perform some calculations.

I’ve downloaded the Yokogawa DX112 library (with some VI’s) for Labview, in order to get measurement data from the datalogger. When I try to set up a direct communication in between the computer with Labview and the datalogger over the Ethernet, I can get the measurement data without any problem.

When I’m programming the communication in the FPGA LV interface (I copy and paste the code from the downloaded Yokogawa DX112 VI’s into my FPGA VI), I’m getting a bunch of errors. The communication cannot be established.

I’m programming an FPGA code in order to be compiled to a cRIO-9073, which will execute the FPGA program independently. 

 

Here you can see the FPGA VI with the copied code from the downloaded Yokogawa VI: 

 

  

The copied code from the downloaded Yokogawa VI:  

 

 

 

As you can see, this code consists of several subVI’s. For example, this copied VI named ‘Getting Started’ uses the subVI named ‘Initialize’, the subVI ‘Get Measurement Data’ (which is projected in detail, not in the shape of a functionblock like the subVI ‘Initialize’..) and the subVI ‘Close’. Behind these subVI’s, there is a code, which also can consist of several subVI’s, each with his code or his subVI’s. This is an example of the error code I get, when I drag and drop the copied code into my FPGA VI:  

 

  

 

When I execute the VI out of the FPGA interface, there are no problems at all.

But in the FPGA VI, the code seems to be totally wrong (wrong wires, wrong connections, no recognition of the integrated subVI’s and so on).

What could be the problem ? Do I have to import the Yokogawa DX112 library into the Project Explorer of my FPGA program (for the cRIO-9073) ? And if so, where do I have to drop it in ?  

 

 

Regards, Kenneth

Message Edited by Kennie87 on 03-06-2009 09:43 AM
Message Edited by Kennie87 on 03-06-2009 09:44 AM
Message Edited by Kennie87 on 03-06-2009 09:45 AM
0 Kudos
Message 1 of 6
(3,472 Views)
LabVIEW FPGA code doesn't work to well with strings. If you do need them,
you should make them fixed size, which they are not by default. FPGA's are
very bad in: array's, clusters and strings. And these are just the things
you use... This is why you get the errors: types are not supported (variable
sized arrays and string), format into string is not supported (since it
would require dynamic memory allocation).

NI FPGA's don't even have an ethernet connector. What do you expect ethernet
VI's to do? Obviously, this will never work.

I think you have a very wrong idea about how the FPGA works. FPGA's are
number crunchers. They exceed in performing huge amounts of math operations,
and in parallel as well.

Perhaps you are trying to run it on a cRIO? That makes a lot more sense.

Only way to get ethernet/ TCP/IP running on an FPGA is to bit bang digital
outputs, and to implement a complete TCP/IP stack yourself.

Regards,

Wiebe.



Message 2 of 6
(3,458 Views)

Hi Kenneth,

 

Strings are not supported in LV FPGA. I think what you want is to run all the network related code in RT (or Windows) and then have that code communicate with the FPGA. I don't have time right now to find the links, but there are some tutorials about getting started with CompactRIO.

 

Good luck. 

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

Ok, thanks for the quick replies. I'm going to try to solve the problem with the scan interface which does support most of the functions.

 

Regards, Kenneth

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

Is it possible to use a shared variable (absolute variable), which reads data in a scan interface VI, in a FPGA VI ?

Cause I'm getting the message that the type of shared variable I've created is not allowed on the computing device.

 

 

What am I doing wrong ?

 

 

Regards, Kenneth

0 Kudos
Message 5 of 6
(3,323 Views)
Use of shared variables is not supported in an FPGA VI, you will have to transfer the data to the RT-controller using an FPGA I/O Node. From there on you can use Shared variables to transfer the data to the host pc.
Best Regards

Michiel
Applications Engineer
NI Belgium
http://www.ni.com/ask
0 Kudos
Message 6 of 6
(3,214 Views)