LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

please help me with it ...

Hi ,

I am using LabView8.2 for my project , NI-9233, NI9101 , NI 9012.

i have attached our draft programs.and i have been recomanded to modified the NI-9233 getting started example program.(Find Example>> Hardware input & output >> compact RIO>> module specific >> Analog input >> NI-9233 getting started.vi proj.)

The flow of our program is as followed:  

-there is an Voltage input from an accelerometer(3axis) and it will pass the Volt to NI-9233

-Inside the processor , what we want is to compare the acceleration at each axis

            (i) if  it is less than 20 g , it will just run the program

            (ii) greater than 20 g , it will record the data

            (iii) greater than 50 g , it will show alarm ,exract time line, signal out

-Inside the attached program , we can test the above all of those conditions using random numbers .

                             

What my problem

-I have no idea to combine these two program together in order to get what we want .

-Now we can run our own program , but i don't know how to put our program inside the NI 9233 example program to be compactable with NI 9233

I am looking forwards to your reply , thank you very much for your support

Best Regards ,

0 Kudos
Message 1 of 10
(3,601 Views)
Hi roxylat,

I recommend you try to use the "NI 9233 Getting Started (Host).vi" as a subVI to the VI you have developed.  The "NI 9233 Getting Started (Host).vi" is found in the example project under the cRio target.  This VI configures and acquires the analog input data off of the 9233 via the FPGA VI.  You could call this VI as a sub VI in place of your random number generator, and return just one sample per channel from the subVI so it returns values in the same manner as the random number generator (i.e. one sample per channel per while loop iteration).  This seems to be the simplest way for you to integrate your code with the 9233 example!
Brian A.
National Instruments
Applications Engineer
0 Kudos
Message 2 of 10
(3,566 Views)

Thank you so much for your support. But i am not quite so sure about that FPGA VI from your message . Does that FPGA VI mean NI 9233 getting started (fgpa).vi ?

0 Kudos
Message 3 of 10
(3,548 Views)
HI ,
       I would like to ask you one more thing , pls refer to the following that is our viproj .. is it like what you ask to do ?
if yes, there got some errors about wire line like the following in the NI-9233 getting started (host).vi .
and there are errors in the NI 9233 getting started (fpga).vi also.
 

Thank you so much . i am looking forward you reply .

0 Kudos
Message 4 of 10
(3,522 Views)

Why not attach the images to your message as .png files rather than having them hosted on some 3rd party webserver?  They are rather small and hard to see what's happening with that wire.  It would be best if you posted the .vi as well.

It looks like you have a mismatched datatype.  You have some sort of integer value (the blue wire coming out of the multiplication) trying to go into a terminal of a different type.  It's hard to tell because it is cutoff in your screenshot and it is reduced so small, I can't make out the color of that wire.

If you turn on Context Help and hover your mouse over that wire, it will give you some details as to what the wires are and why they won't connect.  As well as clicking on the broken run arrow at the top of the VI.

0 Kudos
Message 5 of 10
(3,498 Views)
Hi roxylat,

I would like to also suggest that you follow RavensFan's recommendations.  His tips will definitely help the community support you!

By FPGA VI I was referring to the VI that is actually compiled to the FPGA.  So you are correct that I mean the "NI 9233 getting started (fgpa).vi"
Brian A.
National Instruments
Applications Engineer
0 Kudos
Message 6 of 10
(3,471 Views)

Thank you so much for your support.

Now there is no error already.

So i need to put the NI-9233 getting started(host).vi as subVI into my program,general 1.vi , am i right?

if yes, which one will be input and output of this subVI (NI-9233 getting started(host).vi).?

pls see the top right most of the following pic(front panel of NI-9233 getting started(host)), the connector.

is the input sample/channel or data rate?

and which one will be the output that can connect with our program?

Thanks a lot .I am looking forward your reply.

Best regards,

 

0 Kudos
Message 7 of 10
(3,432 Views)
You do not "need" to use the NI-9233 getting started(host).vi as a subVI.  This is just my suggestion for a simple way to integrate the example code with the VI you have already built.

As for the inputs/outputs of the subVI, these will be up to you depending on what inputs you would like to send to the subVI, and what data you would like to have returned from the subVI.   If you are having trouble assigning these connections, try looking at the LabVIEW Help under Fundamentals >> Creating VIs and SubVIs >> Concepts >> Creating SubVIs.  This documentation tells you how to properly use subVIs, including how to build the Connector Pane.

I hope this helps!
Brian A.
National Instruments
Applications Engineer
0 Kudos
Message 8 of 10
(3,393 Views)
Thank you once again for ur advice ...
now i have a problem about connecting between the fpga program and the host program.
----- when i run my host program , the fpga doesn't not run automatically , ( i think fpga has to be run once the host program runs) .
----- i understand that if i want to connect a link between them i got to use FIFO to write the data in fpga and read the data from host program .. but .. i have no idea about how to link them up . Can you please suggest me how should i deal with FIFO (i m a bit blur with it ):smileysad: 
........
so please give me some advice to slove this ...
 Best regards ,
roxy
0 Kudos
Message 9 of 10
(3,339 Views)
Hey Roxy,
 
To get a reference and run the FPGA using a host you'll need to make use of the Open FPGA VI Reference and make sure it is set to Open and Run by right clicking the Open FPGA VI Reference.
 
A good place to look into FIFOs will be the example finder and Using DMA FIFO to Develop High-Speed Data Acquistion Applications for Reconfigurable I/O Devices.
 
In the example finder, browse for Toolkits and Modules>>FPGA>>CompactRIO>>FPGA Fundamentals>>DMA. You'll find some great examples there.
 
Hopefully this helps!!
Aashish M
CEO
TransferFi
www.transferfi.com
0 Kudos
Message 10 of 10
(3,282 Views)