LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Labview FPGA to control an inkjet printer

Currently I am working on a project using Labview FPGA to control a inkjet printer. The hardware and a Labview program had already been developed. My objective is to implement the logic circuit of the hardware such as stepper motor control, DC Motor control and quadrature decoder circuits into the FPGA chip. I am still picking up on Labview FPGA module and I really need some help on the start. What are the possible program that I can implement? I am using Labview 8.0, Labview FPGA and PCI 7831R. I can send all the schematic or required informations if you want. Thank you.
 
 
Best Regards
Alex oh 
 
 
0 Kudos
Message 1 of 18
(12,907 Views)
Alex,
 
For quadrature encoders, there are a lot of shipping examples which come with the FPGA module.  If you go to example finder and expand toolkits and modules->FPGA->R Series->FPGA Fundamentals->Counters, you will see a few great quadrature examples.
 
As for the motion control, this can be done too, but the easiest way is to use the SoftMotion Module, but you can also try this out manually.
 
Let me know if you have any more questions.
 
Regards,
 
Craig D
Applications Engineer
National Instruments
0 Kudos
Message 2 of 18
(12,855 Views)

Hi Carig,

Thanks for the useful links. Currently I have LabVIEW 8.0, FPGA8.0, RT 8.0, NI-RIO 1.1 & PCI 7831R & MAX 4.1. I had no problem locating PCI7831R in MAX, however I couldnt find PCI 7831R in the project manager. I try installing in Labview 8.2 but the same problem occur. 

Finally, I found out it might be due to the NI RIO version. When I try to install NI RIO 2.0, an error 'install RT run time 5.5' appeared instead.
Is there something I had miss out? What is the difference between the Labview real time RTX and ETS?  Which one should I install?
 
Best Regards,
Alex oh 

 

0 Kudos
Message 3 of 18
(12,845 Views)
RTX is for PCs running real time extensions for Windows.  If you don't have this, you should be running the normal ETS.
 
Craig D
Applications Engineer
National Instruments
 
 
0 Kudos
Message 4 of 18
(12,741 Views)

Hi,

I see thanks for the useful links.

 

Alex oh

0 Kudos
Message 5 of 18
(11,921 Views)
Hi Carig,
 
I had look through the example of the quadrature encoder. It is what I needed. However, there is a part on obtaining the time interval for velocity and acceleration calculation, which I dont really understand. How can find or capture the time interval for the calculation? Can I fix the value? I really need some explanation from you.Thanks
 
 
Alex oh
0 Kudos
Message 6 of 18
(11,866 Views)

Aelx,

You would fix the value for the time interval you are comparing against.  The general idea is that you are measuring the number of pulses in a fixed period to compute the velocity. 

For instance, lets say you have an encoder which outputs 1200 counts per revolution.  If your fixed time interval is 100ms and you measure 120 counts in this time span, you are going at 60 rpm by the equation near the top of the document.

[(120/1200)*(60/1)]/0.1 = 60 RPM.  Acceleration is the the first derivative of velocity with respect to time and is calculated by the next equation.

Regards,

Craig D
Applications Engineer
National Instruments

Message 7 of 18
(11,804 Views)
Ok. I see. That means to find velocity I need to know the encoder count/rev and a fixed time interval.
The inkjet printer that I am working on uses a optical linear encoder which is mount onto the ink cartridge. So the movement of the optical linear encoder depends on the the DC motor. In another word, the number of count/rev depends on the DC motor. Please correct me if I am wrong. 
 
May be to let me have better understanding,
 
1)How do I calculate the acceleration in RPS or RPM for a encoder 300rpm, 2000count/rev, 1ms with a 10% change in velocity? 
2)Does the calculation apply to rotational encoder only?
3)How do I calculate the position in mm and velocity for optical linear encoder in my case?
 
Hope to hear from you soon!
 
Best Regards,
Alex oh
0 Kudos
Message 8 of 18
(11,609 Views)

Hi Craig,

I need to generate a clock 400Hz to synchronise with the logical circuit to control the stepper motor. I try with a Labview FPGA but the stepper motor does not move at all. I think I didn’t get the sequence correctly.

How can I generate the circuit using Labview FPGA? I am using Labview FPGA 8.0, PCI 7831R.

I had attached the circuit diagram. I need some advice from you.

 

Thanks

Alex 

 

Message Edited by oh on 08-02-2007 07:55 AM

0 Kudos
Message 9 of 18
(11,413 Views)
 

Alex,

The correct way to generate a clock signal can be seen in the following DevZone article in figure 5:

Synchronizing Multiple CompactRIO Chassis 

As for the equations, they should be about the same, except instead of counts/revolution, your encoder is in counts/in (or mm/cm/ft...).  Think about it in terms of what you want your equation to result in and what cancels out. 

Currently, it 's [(counts/(counts/rev)*(s/minute)]/s.  When you simplify this, you get rev/minute.  If you want distance/sec, you just replace counts/rev with counts/in.

Regards,

Craig D
Applications Engineer
National Instruments

 

Message 10 of 18
(10,608 Views)