06-01-2014 05:22 AM
Hi!
As I want to use C language to assign the memory in myRIO,i.e label a certain area of the memory as memory 0 to 100,is that possible to do that using language C?
Looking forward to your help!
Sincerely,
John
06-01-2014 05:24 AM
Besides,which function could I use to put some data in the memory?
Thanks a lot!
Sincerely,
John
06-02-2014 10:36 AM
Hi saddadaa1,
I would recommend going through a basic C/C++ tutorial that will give you all of the details on data allocation and use from within your program (e.g. covers the differences between static and dynamic allocation, local and global, etc. etc.). There are many, many good ones online.
06-02-2014 05:37 PM
Thanks,I have learnt that in Labview I can assign a certain area of memory by a basic module.If I assign the memory by Labview,then run my C program within myrio using the memory address assigned by the Labview module,is that going to work?
Thanks for your kind help!
Sincerely,
John
06-02-2014
10:08 PM
- last edited on
05-05-2025
12:28 PM
by
Content Cleaner
What you'd want to use if you are passing data between LabVIEW and your C/C++ is something like an array. This article gives an overview of how to do just that.
06-03-2014 04:37 AM
Really thanks!I have read this material,but I have some confusions,could you explain a little bit to me?Sorry I am not quite famaliar with this but I need to complete a project recently.
What I want to do is to write a certain packet by C language and put it to the memory in FPGA,then read by Labview and send it out.I see from the material that there is a Labview string pointer,can I use it to point to the string that I create in the C program?Actually I have not understanded the material totally.
Sincerely,
John
06-03-2014 07:40 AM
A few points of clarification:
Write a certain packet by C - Do you mean a networking packet of some sort? Or simply some structured data?
Put it to the memory in FPGA - I'm not really clear what you mean here. Traditionally, you write HDL language to be used by a FPGA
Then read by LabVIEW and send it out - Read from the FPGA? and send it out, what, one of the network interfaces?
I think it makes sense to get a more clear picture of what it is you want to do first before spending more time on something that may not be relevant
06-03-2014 08:19 AM
Sorry I did not make it clear.I just want to store some data into the memory in FPGA and then read by Labview,not used by FPGA.
As I use Labview to assign a certain area of memory,and when I use the C program write the data into it,it appears to say that "Could not open FPGA."
So is there any other way to store the data in the memory of FPGA?
Really thanks for your help!
Sincerely,
John
06-03-2014 09:07 AM
There are three systems that I see here, and I am still not completely clear as to what you are trying to do. How do LabVIEW (and are we talking about LabVIEW Real-Time, LabVIEW FPGA, or LabVIEW desktop here?), C, and the FPGA all fit together in what you're attempting to do? Where is the component written in C? How are you interacting with it? Are you actually just using the FPGA to store some data to be retrieved?
06-03-2014 09:23 AM
OK sorry it is my mistake that I did not make it clear.The mission I need to do is just put some strings using C language(based on Eclipse Software)into the memory in FPGA,what kind of function could I use?Sorry to bother u so much!
Sincerely,
Liu Di