text file as config
Hello world
Once again I have some difficulty.
I'm trying to control Goepel Cascon with my labview. What I basically want to achieve is:
I want a configuration file that contains a part of the serial number of my share a name. The serial number is parsed as a string of alphanumeric one limited to the first 10 characters. Now, I want to find the line in the text file that this shorter string is also written in as the name that is separated by a tab number is supposed to be read by labview and transmitted.
All this is necessary for my final program when the apllication is generated can be updated just by writing new things in a text file.
Thanks for help.
Michael
It would be useful that you can attach the text file. Basically for your scenario, you can read the text file in a table 2D-string with 'Tab' as delimiter and find the serial number and the name of the party. Come back if you face any problem.
Tags: NI Software
Similar Questions
-
How to extract specific data from a text file
Hello world
For my project, it is necessary that a parameter file is read at the beginning, so that variables be initialized with specific values that change with the user.
For now, the mode of action is as follows: the values in a sequence specified in a text file are read and saved in a table and the elements of the array are extracted according to their index.
The problem with this implementation is, that if for any reason any changes file format, for example we want to use a settings file from a previous version of the program, which has the values for the variables of same but in a different order, the only way to have good values for the parameters is to change everything accordingly which is really time wasting.
Could someone suggest another implementation that make reading the different values independently of their order in the file, for example by analysing the file for specific strings and by reading the value after the string?
Thank you very much.
P.S. I've attached a screenshot of the routine, which I use now.
Hi panagiov,
Find attached files.
Method 1: in this you can search for each variable separately. You can use "Live Config file" to get all the keys (variable) at a time, and then you can use for loop to get their values. Or you can access values as indicated in the present code.
Method 2: Here you will have all the data at once. You will get variables and data (table 2D), you should look for the variables as needed.
I hope you understand these methods.
Good luck
-
b and characters appear when reading from a text file
The image shown vi opens a text file from hard drive with ' Open/create/replace the file' and 'reading a spreadsheet file.
Then the vi displays the text in the respective indicators.
In these two indicators, there is a y and b that appear as the first characters.
It's not exactly a y and b. Two points above him there and the stem of the b blocks down, a script not anglophones.
In Word and Notepad these characters appear. The first character is a zero, as I wrote it originally.
The text file was initially created in Excel and then saved as a unicode text.
Where are these funky letters? and how do I get them to leave?
Also, it seems that the text of these two indicators add a blank line after each line. That does not appear Notepad or Word either.
Carmen92126 wrote:
The text file was initially created in Excel and then saved as a unicode text.
There's your problem: unicode. You can see this quick phone: Config file "byte order mark"
Yes, by saving in Unicode format, you have a few extra bytes that know most of the text editor to ignore. But LabVIEW gives you just the raw data.
-
Hello world.
I'm new in development for Blackberry and this forum helped me a lot so far.
But now Im stuck with a relatively easy task.
I like to include a text file in my application webworks, before putting it on the device or the Simulator.While I can read and edit over time. My problem is that I can't find a way to implement this.
Help would be really appreciated.Yes, you can include a resource file (text, XML, JSON, etc) in your application WebWorks you can READ when you run. Note: you cannot EDIT this file once it is conditioned in DOC (read-only).
I guess that you are looking to set the settings of a / config file? Recommend that you use JSON format instead of a simple text file. It is easier to analyze. It is recommended to read these data once during the 1st start time and save to localStorage, after which you can change at will.
Here is a working example of a file "Data.xml", packed in an application and read using XmlHttpRequest:
http://BlackBerry.github.com/WebWorks-samples/kitchenSink/HTML/browser/XHR.html
Source code:
https://github.com/BlackBerry/WebWorks-samples/tree/master/kitchenSink
-
AppleScript to delete a text file
Hi, here is a job Applescript that lists the contents of a folder and its subfolders to a text file named 'file inventory. The problem, for example, is that if a subfolder is emptied of files, the list of his previous content is always indicated in the text of the inventory of the last time file that the script is run. So, I would delete all of the text in the file until it is written again. I searched and found this code and put my name of file in there, but I can't make it work.
Any help will be appreciated.
expressions of folklore ": folder files inventory.txt" value 0
property file_id: null
tell application "Finder" for the value this_folder for folder 'movies' from disk 'files '.
the value log_file_path to ": folder files Inventory.txt.
file_id value to open access file log_file_path with write permission
Try
write ('Start' & (current date) & back) to file_id
my do_subfolders (this_folder, "")
write (back & return) to file_id
file_id of close access
say "finished".
we error error message
file_id of close access
errMsg say
end try
on do_subfolders (this_folder, name_prefix)
say application 'Finder '.
Journal name_prefix & string (name of this_folder)
write (back & name_prefix & (name of this_folder) chain ) to file_id
the value File_List for each file in this_folder
Repeat with this_file in File_List
Journal name_prefix & "" & string (name of this_file)
write (back & name_prefix & "" & (name of this_file) chain ) to file_id
end Repeat
the value folder_list for each folder in this_folder
Repeat with this_subfolder in folder_list
my do_subfolders (this_subfolder, "" & name_prefix)
end Repeat
end say
end do_subfolders
You are on the right track, but set the folklore expressions takes the file reference that you have already opened, not the path text.
so, since you open the file via:
file_id value to open access file log_file_path with write permission
the appropriate solution would be:
file_id of the folklore of the value to 0
-
Is there a way to open the text files with arbitrary extensions?
As part of the mobile platform iOS, is possible to open arbitrary text files that have an arbitrary extension? For example, in the course of my work day, I meet regularly with plain text files that have an .out extension. I'd love to be able to open these simply with iOS notes without renaming them in .txt. I meet many of them and only need to do this for a few minutes, so take the time to rename them significantly adds both.
On the desktop a BONE can generally "open with", then choose the application. I'm looking for the equivalent in iOS. Please note that to access the files on iOS is not a problem with icloud drive, dropbox, etc.. they just can not be opened easily. Simple text editor, word processor not full blown.
You will need a software that can handle the file.
Usually the file management applications can manage any type of file. I like the 5 Documents to Readdle, it can open almost anything.
https://iTunes.Apple.com/us/app/documents-5-file-system-PDF/id364901807?Mt=8
The equivalent of 'Open with' in the iOS is "open in", 'Share xxx' or even 'Copy To '.
How to get to it, depends on where the file is located.
ICloud drive for example, you can do open the file in a specific application by holding your finger on the icon of the file and by selecting more «...» "in the menu that appears, and then selecting"Share point... ". "and finally select an application from the list.
-
Create the file CSV to edit the text file
I am trying to convert an image list to a CSV file, so I can import it into a Web site. But the Web site importer does not recognize out of editing text in CSV. I am registering as a simple text file. When I create dummy data in a spreadsheet and the export to CSV is exactly the same when I opened in text editing, but it matter perfectly.
Any ideas?
The following thread might solve your issue.
-
How can I put all the mail to a folder in a text file?
I want to put all the lines of the object to a file (any file) in a text file for analysis of traffic.
Right-click on a folder, ImportExportTools/export all messages in the folder/just index (CSV or HTML).
-
Here is the message from text file:
%% [ProductName: Distiller] %.
X8AEC0BD1 not found, by using the messaging service.
%% [Error: invalidfont;] [OffendingCommand: show] %.Battery:
()%% [Flushing: rest of job (end of file) will be ignored] %%.
%% [Warning: PostScript error.] No PDF file produced. ] %%What print driver are you using to print to PDF. Firefox is not any printer to print a page in PDF format.
I use CutePDF , if you are interested. It's free.
-
How can I save an email as a text file before you delete it my Inbox?
Some emails I want to save on my computer so that I can view without opening to the top of my email. I'm used to be able to do this by registering in a document as a text file folder. (Outlook express). I don't find this capablity in Thunderbird. If it is there, I have not found it.
File | Register under gives you several options. By default, it will save in an .eml file, which will need an e-mail client to display. You can usually save drag-and-drop, but that creates an .eml file too.
You can save as HTML by putting in a file html extension when you do file | Save as.
This add-on:
https://NIC-NAC-project.org/~kaosmos/mboximport-en.html
offers several options to save one or more messages in different formats.
-
How can I convert a page typed into an editable text file
How can I convert a page typed in an edible text file? I have a 50 page typed (on a typewriter ;-) document I want to convert (scan?) in a format so that I can then open the file in a text editing application (Word?) and edit.
How is the most effective (and least expensive) way to do it?
Thank you
HAL
< re-titled by host >
"Edible text file?" You hear as he print on rice paper, so you can serve it up like at dinner side dish? You want someone to eat their words
I think that the last two multifunction printers, I bought came with some kind of OCR characters (OCR) software as part of the sweeping package. I guess that's not the greatest.
-
Our clients have trouble downloading a text file (.txt) on our site version 33.0 (using a filestream). It worked well in previous versions.
The error message they get reads as follows:
{name of file and download user path} not can be saved, because the source file could not be read.Thank you
MikeIt is an old relative to corrupted downloads (http://kb.mozillazine.org/Source_file_could_not_be_read) error message, but has become more widespread in Firefox 33.
To make a long story short... before, if the server sent a response which was smaller than the specified size, the gap has been ignored and the download was considered to be very good. From Firefox 33, a file that is smaller than the specified size is considered as being damaged.
This comment in the bug tracking system has more information: https://bugzilla.mozilla.org/show_bug.cgi?id=1083090#c8
-
Automator: using a text file to set several items from the finder?
Hello
what I would do:
I have a text file that contains multiple entries for files and folders, each on a separate line. I want to dragndrop this file on an automator action, he should ask me a destination folder and then copy all the files and folders in this folder.
I have my action, automator, set up like this:
Elements of the open Finder
Get the content of the TextEdit Document
Copy to the Clipboard (I have not found another way to keep my text sort file values and let it not be crushed by the following, but it works)
Quit the Application (TextEdit)
Ask the Finder items (this requires a destination folder)
Set the value of the Variable (Destination)
Get the contents of the Clipboard
Copies the items from the Finder (at Destination)
It all works, but only when there is 1 entry in my text file. As soon as I have 2 lines of text, I get the following error message:
The action "copy Finder items" has not provided with the required data.
How can I make this work with multiple entries?
The problem is that you only pass the only element to the copy action (you have copied text), instead of an element for each line (paragraph) in the text. The solution is to use the action filter paragraphs to break up along the borders of paragraph text, which will give you a list of items. In addition, you do not necessarily have to use TextEdit or the Clipboard - If you already have a file somewhere, you can simply use the action to combine text files to read the text.
With the above modifications, your workflow should look like:
Ask the Finder items (ask for a destination folder)
Set the value of the Variable (Destination)
Ask the Finder items (Download text files) - set the action to ignore the entry
Combine text files (read the text files)
Filter paragraphs (paragraphs which are not empty return)
Copy the items to the Finder (at Destination)
-
USB for my iPhone, so it can read a text file
Hi, I would like to be able to connect a standard USB to my iPhone, so it can read a text file from USB, any suggestions on cable/apps? Thank you, Tony
Hello. In fact, you can use any USB adapter to connect your iPhone to the computer and transfer text files. Apple recommends the adapter like this http://www.apple.com/shop/product/MD820AM/A/lightning-to-micro-usb-adapter
-
I need to scratch the data of a few 1000 + email. How can I believe more easily the content of these emails and either push in text files, or treat them with a script?
Thank you
Install ImportExportTools:
https://addons.Mozilla.org/en-us/Thunderbird/addon/ImportExportTools/
http://chrisramsden.vfast.co.UK/3_How_to_install_Add-ons_in_Thunderbird.html
Copy the messages in a folder, select the folder, tools/ImportExportTools/export all of the messages in the text file / in the single folder.
Maybe you are looking for
-
The text is legitimate or not?
Just got this text on my iPhone to [email protected] : ({UID (my phone number)}, very important Action required by Apple.) Wwv2.loccked-actID-.hftew.com/..support team-thank you for visiting you! [P52CB04] With all the typos, I guess i
-
All addresses in my contact list are under "personal address book" and none in "collected addresses". The personal address book is too long and fill to the top with addresses I rarely (if ever) use. I prefer the new addresses that are automatically a
-
How is it with the new iOS 9.3 I can't send a video via iMessage?
I have an iPhone 6 more with the new iOS 9.3 installed a few hours before. I have problems with sending video via iMessage. I have tried both directly through iMessage by tapping the (camera icon) to the left of the body of the text, this in turn, I
-
Availability of Bluetooth and Gigabit Ethernet?
I am looking to buy the Pavilion 17-e105sa or 17-e153sa. They have Bluetooth and/or gigabit ethernet connections? Thank you
-
Found the technote to use "Dell Mobile Print for Android" to print new smartphone that I arrived to my printer in 2155cdn home wireless network. Download the app on goggle play store. http://www.Dell.com/support/article/us/en/04/SLN155159/en store se