LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use Labview FPGA to control an inkjet printer

Hi Craig,
 
The clock synchronise example that you had show me is much precise than what I had done. I am still puzzle on how to calculate the frequency for my program loop without using positive edge trigger. This really comes in handy!
From the example, am I correct to say that the scan rate is the period of active low and pulse width is the period of active high. By adding both, I will get the full period which is the clock sychronise time.
 
Is there a way that I can just insert the clock frequency manually on the GUI, then it will inputs into the scan rate and pulse width value?
For the count/inch calculation, I still working on it. I hope to discuss more with you. I really learn alot from you. Thanks!
 
Appreciate your help!      
 
 
Best Regards,
Alex
0 Kudos
Message 11 of 18
(6,707 Views)
Alex,
 
You can think of the loop timer as the absolute timer of the loop.  The way the VI works is you set your desired period in the loop rate, then the line is set high for the time set in pulse width, then low for what remains of the period.
 
For example, if you set the loop timer to be 1000 us (1 ms) and the pulse width to 750 us (0.75 ms), you will get a 1 kHz clock with a 75% duty cycle.
 
As for your second question (if I understand it correctly), yes, you can set the rate and pulse width on the host VI.  In fact, the example I showed you is doing this--controls on the FPGA VI are set in the host VI using the read/write controls VI.
 
Regards,
 
Craig D
Applications Engineer
National Instruments
0 Kudos
Message 12 of 18
(6,623 Views)

Hi Craig,

Ok. I see. I had misunderstood the function of the loop timer. I will look through the example again.

 Thanks for the guidance!

 

Best Regards,

Alex 

0 Kudos
Message 13 of 18
(6,386 Views)
Hi Craig,
 
I had problem creating a sub VI in LabView FPGA. I managed to select the sub VI in the main VI, however it does not display the inputs and output connectors. Its just like calling an icon only. I was unable to select the 'create sub Vi' under Edit. Is there a way to solve this?
Thank You!
 
 
Best Regards,
Alex oh
0 Kudos
Message 14 of 18
(6,294 Views)
Alex,
 
To add inputs and outputs to a subVI, open that VI and right click on the icon at the top right and select Show Connector.  You can then click on the connector block to bring up the wiring tool.  Then click on the control or indicator whose value you want to be passed into or out of the subVI. 
 
To create a subVI directly from your main VI, you would highlight that section of code and go to Edit >> Create subVI.
Brian Coalson

Software Engineer
National Instruments
Message 15 of 18
(6,211 Views)

Hi Brian,

I see. Thanks for your reply!

 

Best Regards,

Alex

0 Kudos
Message 16 of 18
(6,106 Views)
Hi Craig,
 
I am working on a PWM output with reference from the LabView FPGA Example Program and IP cores -> PWM. I follow the VIs codes pretty closely, however I have a few problems,
 
The FPGA PWM(main) VIs that calls the FPGA PWM OUT VIs. When I run the FPGA PWM(Main) VI, the digital output does seem to be display correctly. Eg. I set 20 High time, 80 Low time, the current period should be 100 and the period count should be increasing. But it display the first loop cycle 100 and 0 for the next cycle or current period. As for the period count , it display 0 and then 1.  
 
When I try to compile the VI, it display an error LabVIEW FPGA:  During HDL code generation, an external error occurred.
Error Code: 61056: Component ddata06_res has invalid arbitration for Single-Cycle Timed Loops
.
Thanks for your help!
 
Best Regards,
Alex
0 Kudos
Message 17 of 18
(5,400 Views)

Alex,

What type of printer are you controlling? I'm trying to do the same thing and was looking for a labview based driver, do you have any tips (you had mentioned that the software has been developed).

Thanks

Alex (no relation)

 

 

0 Kudos
Message 18 of 18
(1,348 Views)