cancel
Showing results for 
Search instead for 
Did you mean: 

Control from Host.Vi

SOLVED
Bob_Schor
Knight of NI

Re: Control from Host.Vi

Well, I don't know how your FPGA code is organized, but you seem to be able to open your Project on the Host, go to the FPGA Target in the Project, Deploy, and Run, at which point the FPGA code "does its thing".  If I'm right about the RT Model for an FPGA Target being similar to a PXI target (which is what I'm using), then you may need to change the FPGA code slightly.

 

My LabVIEW RT Project has the Target code running and basically "waiting" for the Host to "tell it what to do" (I actually use Network Streams to set up a Host-to-Target Queued Message Handler, but you could do other forms of TCP/IP communication, such as Network Shared Variables that the Host sets and the Remote monitors).  Once your FPGA code has been modified so that it can "interact" with commands or controls sent from the Host, then you simply deploy and run it.  It should start running and basically "doing nothing", as it is waiting for your Host routine to establish connection with it and start interacting.  So once you have it running (by manually deploying and running it from LabVIEW Project), start your Host routine.  It should connect, and (you'll pardon the horrible pun) Bob's Your Uncle.

 

Bob Schor

Artem.SPb
Active Participant

Re: Control from Host.Vi

Message contains an image

You can run fpga code by Invoke method or by "Run" option.
run.png
If you have free led indicator on your hardware, you can blink it when fpga works.
Or you can add bool indicator and switch it F->T after running FPGA code. If you read "F" value of indicator, code is not runned still.

Bob_Schor
Knight of NI

Re: Control from Host.Vi

Even easier!

 

BS

krupa
Member

Re: Control from Host.Vi

Thank You both,please i will check and let you know the status after 8hrs as here its 11pm now.

I am really feeling greatful for your support Smiley Happy 

krupa
Member

Re: Control from Host.Vi

I did try with the FPGA LED,Invoke method and other,the LED does not turn ON at all.

The code does not seem to run,as said by you.

 

"Project Forum",strip Vi--This is quite new to me,i did search the net for some info on this,unfortunately there ain#t any.

Could you pls tell me the steps to strip the Vi,so i can share it here.

Artem.SPb
Active Participant

Re: Control from Host.Vi

Tell me your hardware, please. I think I can make example for you.

krupa
Member

Re: Control from Host.Vi

Her it is,

CRIO-9073

NI 9237

NI 9401

NI 9505

Bob_Schor
Knight of NI

Re: Control from Host.Vi

Thanks -- a cRIO example that includes FPGA would be much better than my PXI example which is a whole different platform!

 

Bob Schor

krupa
Member

Re: Control from Host.Vi

Actually i quite do not get the problem here.

When the FPGA vi can control the motor,why the Host does not??Also why the communication from Host with FPGA has a prob even after following all the steps??

 

The FPGA LED is added in FPGA Vi,which does not turn ON even when FPGA Code is executed.Why it controls the motor but does not turn the LED ON?

 

Artem.SPb
Active Participant

Re: Control from Host.Vi

Message contains an image Message contains an attachment

1) set property -> IP

001.png

 

002.png
2) compile FPGA code

003.png
3) now you can run host (rio/PC)

004.png
fpga code blink FPGA led on chassis.
also it blink two indicators with different frequency, if code fork, you can see it on chart.

LV15

 

Without your code and settings I can't say your errors.