Reading each value from spreadshee​t file with delay (multiple rows and columns)
Hi,
a) I want to read EACH VALUE from a spreadsheet file having multiple rows and columns WITH DELAY. I am attaching my VI and sample datalog file for reference (tempsensor.txt).I need to do so because as soon as I read put ON the Sensor button on front panel, LV reads all the values at one go. I need the values for each temperature to be displayed after a delay.
b) Secondly, I would like to read another file containing the state of four antennas (deployed:1; undeployed:0). I am logging state of each antenna in each column of the file(magnet.txt) I need to have four LEDS on front panel to display state of the antennas. I dont know what I have done for antennas in my VI is right or wrong. I guess thats rhe wrong way to approach the problem. Please help!!!(column1: Antenna1 state ; Column2:Antenna2 state.. and so..on..)
Any help would be greatly appreciated!!
Thanks in advance,
Ratnesh
FYI: The first column in my datalog file represents timestamp(number of seconds elapsed), second column: reading for temperature sensor 1, third column: reading for temperature senosr 2, and so on. I am using approx. 11 temperature sensors.
Also, I have generated the log files for the reference purpose only. They do not represent the actual values. They are far away from actual values.
Attachments:
01032005.zip 30 KB
Look at this modified version of your VI. After looking at it, I determined that a shift reggister was not required in this case.
Lynn
Attachments:
MultiSensors.2.vi 85 KB
Similar Messages
-
Reading Each String From a text File
Hello everyone...,
I've a doubt in File...cos am not aware of File.....Could anyone
plz tell me how do i read each String from a text file and store those Strings in each File...For example if a file contains "Java Tchnology forums, File handling in Java"...
The output should be like this... Each file should contains each String....i.e..., Java-File1,Technology-File2...and so on....Plz anyone help meThe Java� Tutorials > Essential Classes: Basic I/O
-
How to save data from JTable multiple rows and columns
Hi Y_Not thanks for your help before...
But what should I do if I want to get/save many data from many column and rows??i don't quite understand your (repeated) question. what is the problem with "multiple rows and columns". Y_NOT and i have shown you ways to access them.
all you need are 2 loops: one around your number of rows and one around the number of columns or vice versa depending in which order you want to save things:
for (int col = 0; col < data.size(); col++) {
for (int row = 0 ; row < data[col].size(); row++) {
// save your data
saveData(data[col].getElementAt(row));
// or use yourtable.getValueAt(row, col);
}this is not a problem of Swing/Java but of simple algorithm...
thomas -
Downloading .xls file with multiple rows and Columns
Hi ALL,
I need to genarate .xls file with multiple rows and and Columns and sent as an email.Since our customer having Problem with .CSV files need to genarate .XLS file.
Please do the needful.
Thanks
MadhuHi Madhu,
You might also consider using Excel Spreadsheet XML as the target structure (namespace is urn:schemas-microsoft-com:office:spreadsheet). When you double-click the resulting xml on a PC it automatically opens with Excel. So, users don't see a difference. It will open up a lot of options with formatting including creating multiple worksheets if you wanted to. Best of all you can stick with XML.
See my response in this thread:
Re: Convert XML data into XLS
Thanks,
-Russ -
Reading dilimited input from a text file with tokenizer
i am trying to read in a text file with the following structure: 2 integers on each line with comma as the delimitor.
i am using the BufferedReader stream and Tokenizer to detect ",".
try {
BufferedReader in = new BufferedReader(new FileReader(filename));
//read in the data file
while ((s = in.readLine())!= null) {
int i = 0;
for (i = 0; i < 100; i++) {
t = new StringTokenizer(s,",");
A1 = Integer.parseInt(t.nextToken());
catch (IOException e) {System.err.println(e);}
When i print out A1[i], it only reads the last line of the text file. Please tell me what's wrong.
Also i'd really like A1[i] to store the integer before the comma and another array A2[i] to store the integer after the comma. Please help.
Thanks.
p.s. A1 and A2 are arrays...when i previewd message in Netscape 7 it left out the brackets and the index....What is the for i loop for? If it is to read the next line from the file, then the while loop has taken care of it. Other than this there should be no problem with the rest of the code.
Just add another line to store the next token into A2. -
How to extract Attribute Value from a DBC file with LabWindows and NI-XNET library
Hi all,
For my application, i would like to feed my LabWindows CVI Test program with data extracted from *.dbc file (created by another team under Vector CANdb++).
These files contains all CAN frame definition
and also some extra information added to :
Message level,
Signal level,
Network Level
These extra information are set by using specific ATTRIBUTE DEFINITIONS - FUNCTIONALITY under Vector CANdb++
The opening of the DataBase works under NI-XNET DataBase Editor as in LabWindows using: nxdbOpenDatabase ( ... )
No attribute seems be displayable under the NI-XNET DataBase Editor (it's not a problem for me)
Now, how, using the NI-XNET API and CVI, be able to extract these specially created attributes ?
Thanks in advance.
PS : In attached picture, a new attribute called Test_NI, connected to a message
Attachments:
EX1.jpg 36 KBHi Damien,
To answer your question on whether the XNET API on LabWindows/CVI allows you to gain access to the custom attributes in a DBC file, this is not a supported feature. The DBC format is proprietary from Vector. Also, custom attributes are different for all customers and manufacturers. Those two put together make it really difficult for NI to access them with an API that will be standard and reliable.
We do support common customer attributes for cyclic frames. This is from page 4-278 in the XNET Hardware and Software Manual :
"If you are using a CANdb (.dbc) database, this property is an optional attribute in the file. If NI-XNET finds an attribute named GenMsgSendType, that attribute is the default value of this property. If the GenMsgSendType attribute begins with cyclic, this property's default value is Cyclic Data; otherwise, it is Event Data. If the CANdb file does not use the GenMsgSendType attribute, this property uses a default value of Event Data, which you can change in your application. "
Link to the manual : http://digital.ni.com/manuals.nsf/websearch/32FCF9A42CFD324E8625760E00625940
Could you explain us the goal of this attribute, and what you need it on your application.
Thanks,
Christophe S.
FSE East of France І Certified LabVIEW Associate Developer І National Instruments France -
What VI can read raw data from a TDMS file with scaling information entered?
I would like to use scaling with my TDMS files so that the end user will
only see engineering unit values, however, within my Labview application, I
want to retrieve the raw data. Is there a way to read the raw data using
one of the Vi's in Labview?The scaling information in a TDMS file is stored as properties of the channel. One trick (that I haven't mastered yet) is you can change the properties of the TDMS file (set properties) and set all the scales to have a offset of 0 and a scale of 1. This will apply a scale that has the engineering units be the same as the raw values. Then you can read the data like normal and you'll get the raw values.
There are several issues to be aware of, the first is changing the scale and forgetting to change it back, or some how modifying the data to be incorrect units and not knowing it. For this reason I'd recommend making a copy of the TDMS file to a temporary location to make the modifications to the properties, read it, then delete the temporary TDMS file when you are done.
This is the only way I know of to get the raw readings from a scaled TDMS channel.
Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously. -
I need help figuring out how to take data from internet pages and enter it into one single row in an excel, or numbers if that is the easier way to go. I was also told access might be good to use. Basically I am going to chamber of commerce page and wanting to extract the member listing and enter in a database in a single line. The data is in different numbers of lines as you will see below (info edited to take out personal info). So I want to take the name of business, business owner, address, city, state, zip, and phone and put it into one line on a spreadsheet. I want to do this many times over. I think there is a way to do it through apple script and automator, but I have not been successful after 2 weeks of trying and searching. I have over 800 listings and I surely don't want to go through and do them one at a time. Any suggestions?
Data from website:
Westrock Coffee
Mr.
Collins Industrial Place
North Little Rock, AR 72113
Phone:
Send Email
Member Since: 2011
Sweet Creations by DJ
Ms. J
allace Bridge Road
Perryville, AR 72126
Phone:
Fax:
Send Email
Member Since: 2013
See Also Woman Owned and/or CEO
Premium Refreshment Service
Mr. E
est Bethany Road
North , AR 72117
I want it to look like this
Company name, owner name, address, city, state, zip, phone
How can I get the extra data out of the way and remove the format so that it will go into excel? Thanks for any help you can provide. I am not to savvy with code, but I got a friend who is an IT guy that can help. Thanks againSo, basically, create 800 individual entries, each one containing everything from business name through the phone (not fax) number, add some commas and spaces to entries, and then put each entry on a separate line?
1. Go to website page such as this one-- http://www.littlerockchamber.com/CWT/External/WCPages/WCDirectory/Directory.aspx ?ACTION=newmembers --which seems formatwise very close to what you're trying to scrape.
2. Cmd-A to select all. Cmd-C to copy it to clipboard.
3. Open freeware TextWrangler. Cmd-V to paste info from clipboard into a blank TW document.
4. Remove lines from top and bottom so that only membership list remains.
5. Process lines to remove everything from "Fax" line through "See Also" line. Only business name through phone number will remain in the file.
--A. TW > Text > Process Lines containing . . .
-----(check "Delete matched lines"; uncheck all others)
-----Enter "Send Email" in the search box.
-----Click Process.
--B. Repeat 5A for other lines to be removed
------Member Since
------See Also
------Fax
6. Insert markers to separate entries:
TW: Search > Find . . .
------(check "Wrap around" and "Grep")
------in Find box: \r\r\r\r
------in replace box: \r***
------Click Replace All
7. Remove remaining blank lines:
TW: Search > Find . . .
------(check "Wrap around" and "Grep")
------in Find box: \r\r
------in replace box: \r
------Click Replace All
8. Add comma and space at end of each line:
TW: Search > Find . . .
------(check "Wrap around" and "Grep")
------in Find box: $
------in replace box: , (comma space)
------Click Replace All
9. Remove all returns:
TW: Search > Find . . .
------(check "Wrap around" and "Grep")
------in Find box: \r
------in replace box: (leave blank)
------Click Replace All
10. Insert returns in place of markers:
TW: Search > Find . . .
------(check "Wrap around" and "Grep")
------in Find box: \*\*\*, (backslash asterisk backslash asterisk backslash asterisk comma space)
------in replace box: \r
------Click Replace All
11. Remove trailing comma and blank on each line:
TW: Search > Find . . .
------(check "Wrap around" and "Grep")
------in Find box: , $ (comma space dollar sign)
------in replace box: (leave blank)
------Click Replace All
Import this text file into Excel or Numbers. -
Excel with hyperlinks, multiple pages, and print titles
I have two large excel files that have hyperlinks to the web. In standard page size, each will have multiple pages. Because it is continuous information, Print Titles are required at both the top rows and left columns. However, along with having to shut off Set Print Area, it seems I must also shut off Print Titles in order for Acrobat to maintain the links. The first problem isn't really a problem. Shutting off print titles, however, makes the document useless to readers. Does anyone have a workaround? The only thing that occurred to me is to manually split the pages (they could be linked to a master sheet so I still have a continuous master) and repeat the print title rows, but that seems like a lot of extra work since Excel isn't fond of linking large sections all at once.
I resolved this myself after much experimentation.
(1) Clear Print Area
(2) Remove values from Print Titles.
(3) Manually insert rows and columns that need to be repeated on each page. You can do this as links if you want to.
(4) If your spreadsheet needs lines all around the borders, make sure you one have one empty row and column on all four sides. Without this, you may lose some of the bordering lines.
(5) Hide ALL other unused rows and columns that you do not want to show. This effectively functions as a Set Print Area.
(6) Make the PDF.
(7) If necessary for further manipulation of the worksheet, hide the extra inserted rows and columns (Step 3) as you work with the worksheet and unhide them before publishing. -
Separating values from an excel file and plotting
Hello,
I am using the read excel table vi to read the values from an excel file.I see the data in the output.
I wanted to take the first two columns and multiply each value with 20m and then plot it in a XY graph.
I am attaching the files below.
Thanks in advance
Solved!
Go to Solution.
Attachments:
test data.xls 436 KB
ReadExcelTable[1].vi 23 KBHello,
i acheived the multiplication in a different way but i have another problem.I am only considering two columns in the above excel sheet.After multiplying each value with 0.02 i get another array for the two columns with values say a,b,c,d and a1,b1,c1,d1 and so on.
The plot i require is of (a,a1) (a+b,a1+b1) (a+b+c,a1+b1+c1) and so on.
Any ideas that might help me.I am attaching the VI that solves the problem till multiplication.
Thanks in advance.
Attachments:
INS_plot.vi 59 KB
test data.txt 246 KB -
How to read configuration data from an xml file (not web.xml)?
Hi,
I want to separate the application specific configuration parameters in a separate xml file and read them as and when they are needed? I know that I can use the wb.xml but I want to separate them in a different xml file because I don't want the web.xml file to be played around later after deployment. If any change is needed then it should be done in the application-config.xml.
How can I read the parameters from this xml file in my jsp code and also what should be the location of this file if I have
../webapps/Root/application
directoty structure ?
Any help is greatly appreciated.can you give an example of a property file and also
it is loaded in the jsp ?Hmm... loading properties in a JSP is not a very good idea. You should do it in a separate class, rather than mixing the logic with the display logic.
Properties properties = new Properties();
properties.load(UtilClass.class.getResourceAsStream("config.properties"));
// Add a try - catch block around the load
// for IOException... -
TO DRAW A TABLE WITH MULTIPLE ROWS AND MULTIPLE COLOUMNS IN FORM
Hi,
How to draw a table with multiple rows and columns seperated by lines in form printing?check this
http://sap-img.com/ts003.htm
Regards
Prabhu -
Reading Design values from readback file
Hi All,
I am trying to understand the process of reading back design signal values from readback file.
I have both the .ll file and the readback.bin file
To get the readback file, I executed the below command:
% readback_hw_device [current_hw_device] -readback_file <filename.rbd> -bin_file <filename.bin>
Now, I want to know the command or process to read the design signal values from this .bin file? Is there any command provided by Xilinx or anything else that I can do to read the signal values?
Rgds
Sapan
Hi Syed,
Thanks for the reply. It was actually my own started thread. I had few questions unanswered from that post:
Question:
The procedure for readback that I am following here is based on the ug908-vivado programming and debugging.
I first uploaded the image on FPGA and then I executed the following commands in Vivado Hardware Manager
% create_hw_bitstream -hw_device [current_hw_device] -mask fpga.msk fpga.bit
% verify_hw_devices [current_hw_device] #### For readback verify
readback_hw_device [current_hw_device] -readback_file <filename.rbd> -bin_file <filename.bin> #####for readback capture
This looks a little different from the one suggested in your document. Can you please confirm if my steps are correct?
Using the above procedure, I did not have to explicitly send readback commands to the FPGA using JTAG as mentioned in doc:
http://www.xilinx.com/support/documentation/sw_manuals/xilinx2015_1/ug908-vivado-programming-debugging.pdf
However the other doc http://www.xilinx.com/support/documentation/application_notes/xapp1230-configuration-readback-capture.pdf mentions sending commands to the device in order to be able to do a readback.
So I am a little confused which one is correct?
Also which document will give the words per frame information for FPGA XC7VX485TFFG1761?
Rgds
Sapan
-
I use iPhoto to share my photos to different sites like facebook and flickr ... with facebook it's easy since the pics don't need much details ... however, I have some trouble with Flickr, since I need to add description, titles and tags for each picture ... is there a way to do so ?!
Titles and descriptions are not embedded into a photo until it is exported out of iPhoto with the following settings:
So if Facebook can read those values in an image file you'll need to export as shown above and upload to FB from outside of iPhoto or import back into iPhoto and sync the new files to FB.
OT -
How to get each value from a parameter passed like this '(25,23,35,1)'
Hi
One of the parameter passed to the function is
FUNCTION f_main_facility(pi_flag_codes VARCHAR2) return gc_result_set AS
pi_flag_codes will be passed a value in this way '(25,23,35,1)'
How to get each value from the string
like 25 first time
23 second time
35 third time
1 fourth time
I need to build a select query with each value as shown below:-
(SELECT t2.org_id, t4.description
from org_name t2, ref_org_name t3, code_table t4
where t2.att_data = t4.code
and t3.ref_code = t2.att_type
and t2.att_type = 25 and t3.code_type = t4.code_type
and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q1,
(SELECT t2.org_id, t4.description
from org_name t2, ref_org_name t3,code_table t4
where t2.att_data = t4.code
and t3.ref_code = t2.att_type
and t2.att_type = 23 and t3.code_type = t4.code_type
and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q2,
(SELECT t2.org_id, RTRIM(xmlagg(xmlelement(e, t4.description || ';')
ORDER BY t4.description).EXTRACT('//text()'), ';') AS DESCRIPTION
from org_name t2, ref_org_name t3,code_table t4
where t2.att_data = t4.code
and t3.ref_code = t2.att_type
and t2.att_type = 35 and t3.code_type = t4.code_type
and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date
group by t2.org_id) q3,
(SELECT t2.org_id, t4.description
from org_name t2, ref_org_name t3, code_table t4
where t2.att_data = t4.code
and t3.ref_code = t2.att_type
and t2.att_type = 1 and t3.code_type = t4.code_type
and to_date('01-JAN-10', 'DD-MON-YY') between t2.att_start_date AND t2.att_end_date) q4
Please help me with extracting each alue from the parm '(25,23,35,1)' for the above purpose. Thank You.chris227 wrote:
I would propose the usage of regexp for readibiliy purposes and only in the case if this doesnt perform well, look at solutions using substr etc.
select
regexp_substr( '(25,23,35,1)', '\d+', 1, 1) s1
,regexp_substr( '(25,23,35,1)', '\d+', 1, 2) s2
,regexp_substr( '(25,23,35,1)', '\d+', 1, 3) s3
,regexp_substr( '(25,23,35,1)', '\d+', 1, 4) s4
from dual
S1 S2 S3 S4
"25" "23" "35" "1"In pl/sql you do something like l_val:= regexp_substr( '(25,23,35,1)', '\d+', 1, 1);
If t2.att_type is type of number you will do:
t2.att_type= to_number(regexp_substr( '(25,23,35,1)', '\d+', 1, 1))Edited by: chris227 on 01.03.2013 08:00Sir,
I am using oracle 10g.
In the process of getting each number from the parm '(25,23,35,1)' , I also need the position of the number
say 25 is at 1 position.
23 is at 2
35 is at 3
1 is at 4.
the reason I need that is when I build seperate select for each value, I need to add the query number at the end of the select query.
Please see the code I wrote for it, But the select query is having error:-
BEGIN
IF(pi_flag_codes IS NOT NULL) THEN
SELECT length(V_CNT) - length(replace(V_CNT,',','')) FROM+ ----> the compiler gives an error for this select query : PLS-00428:
*(SELECT '(25,23,35,1)' V_CNT FROM dual);*
DBMS_OUTPUT.PUT_LINE(V_CNT);
-- V_CNT := 3;
FOR L_CNT IN 0..V_CNT LOOP
if L_CNT=0 then
V_S_POS:=1;
V_E_POS:=instr(pi_flag_codes, ',', 1, 1)-1;
else
V_S_POS:=instr(pi_flag_codes,',',1,L_CNT)+1;
V_E_POS:=instr(pi_flag_codes, ',', 1, L_CNT+1)-V_S_POS;
end if;
if L_CNT=V_CNT then
V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS));
else
V_ID:=TO_NUMBER(substr(pi_flag_codes,V_S_POS,V_E_POS));
end if;
VN_ATYPE := ' t2.att_type = ' || V_ID;
rec_count := rec_count +1;
query_no := 'Q' || rec_count;
Pls help me with fetching each value to build the where cond of the select query along with the query number.
Thank You.
Maybe you are looking for
-
Printing to a USB printer via Airport Extreme
I recently purchased an Airport Extreme and connected it to an ADSL router using ethernet. The router is then connected to my company network (PC, Windows, hubs etc). On the AE USB port, I also connected a Sansumg ML-1710P printer which works fine if
-
Freight -Group conditon not getting Reflected at an item level in Delivery.
Hi SAP Gurus !, I want to draw your kind attention towards my problem. 1. I had created a delivery with a header freight conditon type ZF00,the same conditon was getting reflected in all the item,But after sometime i deleted that condition from he
-
Exception in Message Driven Bean
I have a MDB deployed to a weblogic server that listens to a queue on another weblogic server. All configuration is done through a deployment descriptor. When a message is put on the queue, my MDB picks it off, processes the message. I see the last l
-
I have recently upgraded to Java 6- update 18, but noticed that that window.external command from javascript to c# no longer appears to work. I can get the applet to successfully run within the web browser application, but not through C# winform/web
-
Hi, I am migrating my ejb application from weblogic to oracle 9i application server.What changes are needed to be made in code and what configuration changes are required. In my application i use a couple of session beans wherin a session bean calls