02-17-2006 04:22 AM - edited 02-17-2006 04:22 AM
Message Edited by connoryz on 02-17-2006 04:30 AM
02-17-2006 07:32 AM
Good morning connoryz,
Let's review your posting so that i can better understand what you wish to achieve.
The first question is: Is the text file to be read exactly the same as the one attached?
So, you want a vi that, when 1 is selected, it will read line by line from the last point that it read. newline = previous_line + 1. Is this correct? Only when the vi is started that it starts reading from the beginning of the text file.
At any moment, whe n the selection is 2, it the jumps 5 lines from the previous position in the text file. newline = previous_line + 5. Is this correct? What happens if the switch is at selection 2 when first running the vi? Does it read line 1, then line 6, 11 and so on? Or rather, it only jumps once, from line 1 to line 6 then continue to line 7, 8, 9, until the switch is reset (selection 1) and then back to selection 2.. Actually... no... from re-reading your text, if you switch back to 1 it returns to line 1 (back 5 lines) plus 1 = line 2, so it has to keep track of the previous state, is this correct?
Your implementation will actually have 4 selections.. Does each selection multiply by 5?
ie: selection 1 is increment 1 line, selection 2 is jump 5 lines, selection 3 is jump10 lines, selection 4 is jump15 lines. Then increment by 1 line until a change in selection is made. So, can you select 1, then 4 and immediately jump 15 lines? If not, then maybe all you need is a button that says "JUMP 5 lines" and another button "GO BACK 5 Lines"...
I can create an example of the code... but I need to fully understand what you want to achieve because the approach may be different.
Regards,
JLV
02-17-2006 10:47 AM
02-17-2006 10:48 AM
02-19-2006 09:28 AM
02-20-2006 07:41 AM
Sorry..
I was away..
I am preparing an example vi. Should be available soon..
😄
02-20-2006 08:53 AM - edited 02-20-2006 08:53 AM
Hi connoryz,
Here is an example in it's most basic form.
I left the echo of the text file at the bottom of the front panel for debugging purposes. It is set to display "\" codes.
There are some comments in the block diagram. I have to go to a meeting..
The file is selected at run time, so you do not have to place both in the same folder... although it is easier that way.
Hope it helps.
Ray
Message Edited by JoeLabView on 02-20-2006 09:54 AM