LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I use LabVIEW 6i Full Development System to communicate with an embedded controller?

I have learned, thruogh much trial and error, how to open a specific text file. Then go to a certian point and copy a range of characters and then paste then into a specific excel spreadsheet at a desired cell. This only works if the text file is the same every time, since I am counting characters, which is not a reality. Any ideas how I can search for a particular word and then do my cut and paste from there. I am stuck with using the special spreadsheet because it is a template form governed by Doc. Control.

Brad
0 Kudos
Message 11 of 22
(1,073 Views)
Brad,

You won't be able to search for a certain word within a file. The way you would have to go about that is to read the entire file (or at least a portion of it that you know to contain what you are looking for) and then you could use the Match Pattern.vi in the strings palette to find the exact phrase you are looking for. The output of the Match Pattern.vi will give you the matched phrase as well as all the text before and after the match. Then, with a little string manipulation, you should be able to get the portion of the file that you need.

Tyler S
Message 12 of 22
(1,066 Views)
I want to use a push button on the front panel to initial a case structure inside a while loop. My problem is that unless you click off the button very quickly the case structure executes multiple times instead of just once, similar to a "key bounce". Any ideas on a fix?

Brad
0 Kudos
Message 13 of 22
(1,047 Views)
Brad,

You should set the mechanical action of your button to "latch when pressed". That way it will take one reading when you click on the button and then it will go back to the default state. You can change this by right-clicking on the button and going to either mechanical action or properties. If you go to properties and select the operations tab, it will allow you to see the difference in the 6 options. You may also want to consider putting a wait in your loop. This is a good idea in general.

Tyler S.
0 Kudos
Message 14 of 22
(1,040 Views)

@bhenry wrote:
Any ideas on a fix?



Right click on the boolean control, select "Mechanical Action" from the popup and change it to 'Latch When Released'.

Edit: I think the 'Properties' option mentioned by Tyler was added in LV7, but in LV6i there is "Mechanical Action of Booleans.vi" shipped in the examples which describes the different actions.

Message Edited by Donald on 06-07-2005 11:23 AM

=====================================================
Fading out. " ... J. Arthur Rank on gong."
0 Kudos
Message 15 of 22
(1,041 Views)
I've worked out my other problems but now I'm stuck on something simple. I have digital control that starts out at number 1. Can I have both the manual control through the front panel and programatic control that increases it by with every iteration? This feeds a case sequence.

Brad
0 Kudos
Message 16 of 22
(1,028 Views)

@bhenry wrote:
... I have digital control that starts out at number 1. Can I have both the manual control through the front panel and programatic control that increases it by with every iteration?
Brad,
Would using a local variable achieve what you need? (Right click on ctrl on front panel or block diagram and select Create>Local Variable).
=====================================================
Fading out. " ... J. Arthur Rank on gong."
Message 17 of 22
(1,019 Views)
I tried that before. I created a local variable and added one to the input. When I ran the vi it would increase by one, to two, and then imediately go back to one. I could open your vi since I only have version 6i. Attached is a stipped down version of what I'm have a problem with. Any ideas?
0 Kudos
Message 18 of 22
(1,014 Views)

@bhenry wrote:
I tried that before. I created a local variable and added one to the input. When I ran the vi it would increase by one, to two, and then imediately go back to one. I could open your vi since I only have version 6i. Attached is a stipped down version of what I'm have a problem with. Any ideas?



Brad,
"When I ran the vi it would increase by one, to two, and then imediately go back to one."
Since "Get Weld Data"'s mechanical action is set to latch, you will only get 1 incrementation.

But it's not clear to me what you want to do. Is it:
If "Get Weld Data" is true, get all data (0,1,2,3);
If "Get Weld Data" is false, just get data for current value of "Weld Number"?

Side Note:
Are you using LV v6.0 or v6.0.2? If it is v6.0, you should apply the free upgrade/fixes to v6.0.2 appropriate to your operating system.
=====================================================
Fading out. " ... J. Arthur Rank on gong."
Message 19 of 22
(999 Views)
When the GET WELD DATA button is pressed, I want the number that is in the digital control to go to the case structure, run it and also increment the digital control so that the next time the button is pressed it will go to the next case, unless the operator changes it to what they want, i.e. do the same one over. In my vi I have it that case 0 is empty, exept passing a Return Error string, so that while the while loop is running and the GET WELD DATA button is not being pressed, nothing happens. I am running version 6.0
0 Kudos
Message 20 of 22
(998 Views)