01-30-2017 02:08 PM
I have searched around and found an example that is very close to what I need. I would like to be able to set a high current limit of, let's say 20, and a low current limit of 0. This examle works, but I would like to delete the burn in time and instead have a switch that will select between ramping up or down. If you are at current 0 and select "ramp up", it will begin ramping up towards the set current value, if it reaches the set current, it holds there. If at any time you move the switch to "ramp down", it will begin ramping down at the same speed, until it hits 0 and holds there. Perhaps a 3-way switch of up, off, down? Can someone help?
01-30-2017 02:20 PM
Hi Tron,
some pseudocode:
ramprate := current/time out := 0 mode := up WHILE not stop SWITCH mode up: out := out + ramprate down: out := out - ramprate off: out:= out END_SWITCH out := InRange(min, out, max) IF InRange.OutOfRange THEN mode := off WEND
You need an enum for the mode, a case structure for the SWITCH and the InRangeAndCoerce function…
(You might also build up a real state machine from this simple approach.)
01-30-2017 02:25 PM
Thank you for the reply. I should have mentioned that I am very new to labview, therefore I don't actually understand any of your answer. I was hoping someone would be able to modify my example vi and I could look at it to understand.
01-30-2017 02:34 PM
Hi Tron,
so you want someone else to solve your homework instead of trying to learn LabVIEW on your own?
I told you which items you would need. (I forgot to mention shift registers!)
01-30-2017 03:03 PM
I hope you don't sprain your arm patting yourself on the back.
01-30-2017 03:37 PM
Here is something that may help you get started. Open "Ramp Up Down.vi"
01-30-2017 03:51 PM - edited 01-30-2017 03:52 PM
@TronCarter wrote:
I hope you don't sprain your arm patting yourself on the back.
I didn't read this thread that way. You asked for help, detailed help was given. You said you didn't understand it due to your lack of LabVIEW knoledge, a link to learning LabVIEW was given (mentioning homework was a bit of an assumption I'll admit).
If you have a particular function, or feature you are unfamiliar with please ask away and we can be more helpful. But stating you don't understand anything makes me think you should start with the basics. Here's a couple more general links given out.
-MyRIO Project Essentials Guide (lots of good simple circuits with links to youtube demonstrations)
Learn NI Training Resource Videos
6 Hour LabVIEW Introduction
Self Paced training for students
Self Paced training beginner to advanced, SSP Required
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
01-31-2017 01:27 AM - edited 01-31-2017 01:29 AM