Automotive and Embedded Networks

cancel
Showing results for 
Search instead for 
Did you mean: 

How to read data from two channels and send data to one channel using FPGA

I have a CAN module 9853 and I wanna use it on 9014 controller and 9104 chassis. I need it to read analog data from a flow meter and send control commands to control valve real time. I have a data acquisition system using four 9221 and 2 9476 modules. I want to integrate CAN to have a feed back control loop on control valve based on flow meter data. Can some provide me some basic example to start on CAN using FPGA?

 

Thanks,

 

Ajay

0 Kudos
Message 1 of 6
(7,426 Views)

Ajay,

 

You may want to start by looking in the LabVIEW Example finder.  You can pull this up by navigating to Help » Find Examples on any LabVIEW window.  From the Example finder, on the browse tab open the Hardware Input and Output folder, then the CAN folder, and then the CompactRIO folder.  In there you should find examples for using you CAN device.

 

Eric K

Applications Engineering

National Instruments

0 Kudos
Message 2 of 6
(7,405 Views)

Hi,

 

I got hold of one webcast from NI, that was very helpful to see how to configure channels and get them into labview.  I am looking into the examples but I was wondering if some has tried before continuous reading 2 analog and 3 digital channels and if then build a case if one digital channel is set to 0 then operate 1 feedback loop for 2 analog channels and if 2 digital channels are set to 0 then operate a 2nd feedback loop. Feedback loop like continuous read flowmeter and stop when control valve is set for +-5% of desired flow rate based on digital channels going OFF. I am working, in case some one has any lead, i will greatly appreciate.

 

Thanks,

 

Ajay  

0 Kudos
Message 3 of 6
(7,400 Views)

Ajay,

 

This is a little unclear to me, are you running into a specific issue, or are you looking for programming tips?  Is the flowmeter measurement you are trying to make taken from a CAN bus?

 

Eric K

Applications Engineering

National Instruments

0 Kudos
Message 4 of 6
(7,381 Views)

Hi Eric,

 

Right now pro gramming tips. As I said we need to monitor 3 digital signal from control valves (0 ror 12 v), if one solenoid is turned OFF, CAN should sent signal to control valve simulataneously read flow meter to acertain whether the target flow rate is achived and if its within certain tolerence stop controlling control valve. Also keep doing this for this configuration. For example if all 3 solenoids are ON maintain flow rate of 15 gpm and if one goes OFF correct and maintain at 10 GPM and if 2 goes OFF correct and maintain 5 gpm.

 

Thanks,

 

Ajay

0 Kudos
Message 5 of 6
(7,373 Views)

Ajay,

 

If you can get your information into LabVIEW it sounds like the rest should be as simple as using case structures inside of a while loop to output what you would like based on your inputs.

 

Eric K

Applications Engineering

National Instruments

0 Kudos
Message 6 of 6
(7,331 Views)