Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I assign memory in myRIO using C language?

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

0 Kudos
Message 1 of 23
(8,475 Views)

Besides,which function could I use to put some data in the memory?

Thanks a lot!

Sincerely,

John

0 Kudos
Message 2 of 23
(8,473 Views)

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.

0 Kudos
Message 3 of 23
(8,442 Views)

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

0 Kudos
Message 4 of 23
(8,434 Views)

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.

0 Kudos
Message 5 of 23
(8,429 Views)

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

0 Kudos
Message 6 of 23
(8,419 Views)

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

0 Kudos
Message 7 of 23
(8,413 Views)

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

0 Kudos
Message 8 of 23
(8,408 Views)

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?

0 Kudos
Message 9 of 23
(8,404 Views)

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

0 Kudos
Message 10 of 23
(8,401 Views)