LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

case structure

Dear Sir,
          I have written a program for the seperation of raw data and plotting in seperate Excel sheet.This raw data is updated in 3 different Excel sheets depending upon the case.When the case is changed to one another and returning back to the original case the datas are not in sequence manner in the Excel sheet.Pls suggest with the suitable example.My raw data is
 
$SNS,092203.96,A43,2,1,2.31,1.06,,250.20,,31,0.195,,M121
$SSB,092203.96,A43,A,,U,E,M,686290.72,1759584.16,2022.19,4.97,N,,
$GPS,070308092204.32,G,1554.52398,N,07044.45144,E
$GPS,070308092205.32,G,1554.52399,N,07044.45140,E
$GPS,070308092206.42,G,1554.52405,N,07044.45138,E
$GPS,070308092207.37,G,1554.52415,N,07044.45140,E.
 
I have to seperate this $SNS,$SBS,$GPS data and plot in a seperate xl sheet
 
Thanks and Regards
Jayanthi.k
0 Kudos
Message 1 of 6
(5,153 Views)

I hope you are trying to do something like in attached code. please let me know what you expect is something different

 

i think you have improve your coding a lot. see how the code has been modified even though its doing something similar to yours. see that the size of code is reduced dramatically and it is working much faster

 

 

Tushar Jambhekar
tushar@jambhekar.com

Jambhekar Automation Solutions
LabVIEW Consultancy, LabVIEW Training
Rent a LabVIEW Developer, My Blog

0 Kudos
Message 2 of 6
(5,142 Views)

dear sir ,

          Thanks for your information . your coding is very nice.Once again thanks.

But I have one doubt  in this code ie why are you creating a shift register in a loop while writing a value in a setcell value.vi and also how do you choose a array of 3 excel sheet and give into index element(another for loop) which output is given into setcell value refnum.

Pls explain this briefly

Thanks and Regards

Jayanthi.k

 

0 Kudos
Message 3 of 6
(5,077 Views)

When you get the packet you are expected to do the following things

1. Identify the type of packet

2. based on packet type you need to append the data fields in appropriate Excel sheet (To append the data you should know how many rows are already filled up)

 

the code executes somewhat like this

1. You open up 3 excel sheets and add up header rows to them keep the refs to these sheets in array

2. Read the raw data file and create arrray of packets

3. Search for packet identifier

4. Based on packet identifier select the apprpriate currnt row count, and ref to one of the excel sheet

5 add the data to selected excel sheet in selected row (Inner for loops fills up and increments the column count)

 

Notes:

For row count you can not use the iteration count of the outer for loop because every packet will not be of same type, and you dont need empty rows in between

to maintain the rowcount of each excel sheet array of integer is maintained in shift register. the value of appropriate element is incremented after appending data to excel sheet

shift register is initialized to 2 because 1 row is already used up by header

 

please feel free to contact if you have any other doubts.

 

 

Tushar Jambhekar
tushar@jambhekar.com

Jambhekar Automation Solutions
LabVIEW Consultancy, LabVIEW Training
Rent a LabVIEW Developer, My Blog

Message 4 of 6
(5,065 Views)
Dear sir,
 

                   I am really soory fo making a very silly question .I am started to learn labview,so I don’t know these things.Will you pls also send any tutorials or details regarding these doubts and packet identifier.

0 Kudos
Message 5 of 6
(5,032 Views)

Please check the attached code for comments you need to understand

for further queries you can mail me directly on t_jambhekar@rediffmail.com

i am a consultant with specialisation in custom protocol development. i would aprreciate if you can tell me more about what exactly you are trying to achieve. may be i can help you in better way.

Message Edited by Tushar Jambhekar on 03-28-2007 02:28 AM

Tushar Jambhekar
tushar@jambhekar.com

Jambhekar Automation Solutions
LabVIEW Consultancy, LabVIEW Training
Rent a LabVIEW Developer, My Blog

0 Kudos
Message 6 of 6
(5,020 Views)