LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

append data from table

Hi there,

I need some help here..In my table there are 28 datas, 2 columns and 14 rows. In 1st column , there is 7 to 8 digits. I want to group my data according to the value of the first 2 digits of each data in 1st column . If  the data just have 7 digits, I  will add the  0 at the front each data to become 8 digits. The number of  first 2 digits is starting from  01 to  40. I stucked when I want to grouping the data. Please hel p me..I really need this answer. I have attched my program. I am using Labview 8.2

Thanks

0 Kudos
Message 1 of 10
(3,481 Views)
Hi gdah,
save your vi with some values in it please. You can use the "Format into String" function with "%08d", connect a number to it and the result are strings with the length 8. After that you can sort the array. Search for a value with 41 at the beginning and split your array on this position.
 
Hope it helps.
Mike
0 Kudos
Message 2 of 10
(3,479 Views)
0 Kudos
Message 3 of 10
(3,466 Views)
If you see in the .jpg file, there are 14 elements in the array and in the array 2. What i want is, to group all the data according to the first 2 digits. For example I want to make a group name as 23. Means that every data that have first 2 digits with 23 will be in this group. Example 23170608 index 0 and 23170608 index 5. So I need to collect the data in the array 2 at the same index number which is 1715 and 1615 and concatenate the string become 1 string.

Hope that it's more clear.
0 Kudos
Message 4 of 10
(3,463 Views)

Hi gdah,

did you try my first suggestion?

Mike

0 Kudos
Message 5 of 10
(3,443 Views)
Hi gdah,

why do you need locals/"value" property in such a simple vi??? Get rid of them!!!

I made some changes to your vi to reflect Mike's first suggestion. And I tried to incorporate something like what I think you need...
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 10
(3,419 Views)
hi..
Thanks to both of u...I am very appreciate your help. i am not familiar with data array. so I become confused and blur..when I open your vi, it's looks more simple compared to mine..i never know about it..
0 Kudos
Message 7 of 10
(3,403 Views)
Hi GerdW,

Can you help me with my program?..In my application, I using the 2 GSM modem. Both modems will communicate with each other by sending sms. One of the GSM modem will be the master and one will be the slave. The salve will send an sms to the master every half and hour. If there is any missing data that sent by salve, I will stored the data of date and time when the error occured in the .csv file. Recently I using 'read from spreedsheet file' to access the file. The .csv file will only be read at the end of the day. Means, probably the number of data missing can not be predict. Master will send a number of sms to the salve in order to ask the slave to resend the data on the specific time and date. I am using the vi that u gave to me. My data that i want to send is in the string. Referring to your data grouping vi, just assume that my data will be the string.

Can I limit the length of the string to 60 and sending the data to salve? And the remain string will be send after the 1st string sent. Means, only 1 string (max. length 60) will be send at one time. Do I have to use the for LOOP..Smiley SadI getting blur with this application..

hope u can assist me..please..thanks..

0 Kudos
Message 8 of 10
(3,396 Views)

Hi gdah,

here is an example, how you can split your message.

Hope it helps. Mike



Message Edited by MikeS81 on 06-24-2008 07:06 AM
0 Kudos
Message 9 of 10
(3,385 Views)
Hi gdah (& Mike),

here's another solution without building an additional array:




Message Edited by GerdW on 06-24-2008 09:23 AM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 10 of 10
(3,374 Views)