LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2 questions

Dear 

I am trying to use Mathscript and RT Module for this. 

 

Actually i have to do one simulation in matlab and the results i have to send to DAQ board for send the data to some other chip. Can you please tell me how can i use mathscript or some other module to send the output of matlab into the DAQ Assistant.

 

and question for my friend is

So I would like to implement an ability of my VI to open a text file and then using some kind of search function, locate and highlight a keyword that the user enters. Pretty much like when you hit Ctrl F in your internet browser and other places. 

 

I've tried List Folder Function, but that only says whether a file you name is in a certain location. And I've tried Match Pattern but that only splices the file into before and after segments of where the keyword is. 

 

Is there a better function to do this?

 

thx

0 Kudos
Message 1 of 2
(2,486 Views)

I would recommend to use one question per post, just because each question will probably lead to a different discussion and they should be kept in different threads to avoid confusion.

 

Your first question is not clear. You talk about Mathscript but then about "output of matlab". Where exactly is that output coming from? Are you trying to run your matlab code in Mathscipt?

 

LabVIEW has a mathlab script node (requires matlab) and a Mathscript node (does not require matlab, but requires the Mathscript module). Do you have the LabVIEW student edition?

 

Does your simulation use any special matlab toolkits? Mathscript specific questions belong in the Mathscript forum.

 

I would recommend to do the simulation directly in LaVIEW using graphical code. How complicated is it?

 

Your second question is not clear. List folder will return a list of file in a certain location and matching a certain pattern in the file name. It does not look at file content so it is not useful for that. You simply need to read the file into a string indicator, find the word, then highlight it. You don't need to use the string outputs of "match pattern" at all. Form the "offset past match" output and the length of the search term you can uniquely determine the start and end index of the first match using simple math. Then you can repeat that in a loop starting from the last found location to find all other matches of that term.

 

What have you done so far? Can you attach your last attempt?

0 Kudos
Message 2 of 2
(2,438 Views)