LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

memory coding and decoding

Solved!
Go to solution

hi, i am working on the project right now.

i am using a program that someone else created and change it to the new PDA device that we just have.

I need to understand how the programmer coded the old way in order for me to unstanding how to interpetted the 8 memory registers code.

okay, to start from stractch...

this PDA give out 8 memory registers code..

i believe they are hex and its coverted to binary.

there are 26 bits..

the code i will attach take these bits, and decode them out...

i just don't understand what's going on in this code, so I was hoping someone can help me by clearing things out for. 

 

 

Best regards,
Krispiekream
0 Kudos
Message 1 of 12
(4,075 Views)

let me add more details to this ...

the PDA give 8 memory registers as 

01e8  01e8  018c  0015  0180  01ff  0157  0001

 

i know for sure is

((Id1*512)+Id0)+262144=S/N

with reverse eng. S/N=438271 or SN 501639...i forgot which one it was..

 

with that in mind..can someone help me define Id1 and Id0? I can't seem to get that right...

 

 

Message Edited by krispiekream on 03-27-2009 12:04 PM
Best regards,
Krispiekream
0 Kudos
Message 2 of 12
(4,059 Views)
Perhaps someone with strong psyhcic powers will be able to figure this out, but all that I see is a bunch of code that I can't understand since I have no documentation.
0 Kudos
Message 3 of 12
(4,044 Views)

oh sh*t..hahaha..thanks man..

i shouldn't feel bad for not understanding this thing then..

yeah..there is not documentation on this and i have to sit here trying to figure this crap out..

all i know is that its reading from a channel..0 i suppose..

and the channel give out 26 bits and parse subvi decode those bits into something our system is using..

man...i feel bad everytime my manager tells me that its easy..

 

 

i have attached a higher hierarchy..

can you please give it one more try and see if you can help me understand the decode memory location vi..

 

Message Edited by krispiekream on 03-27-2009 01:19 PM
Best regards,
Krispiekream
0 Kudos
Message 4 of 12
(4,040 Views)

krispiekream wrote:

oh sh*t..hahaha..thanks man..

i shouldn't feel bad for not understanding this thing then..

yeah..there is not documentation on this and i have to sit here trying to figure this crap out..

all i know is that its reading from a channel..0 i suppose..

and the channel give out 26 bits and parse subvi decode those bits into something our system is using..

man...i feel bad everytime my manager tells me that its easy..

 

 

i have attached a higher hierarchy..

can you please give it one more try and see if you can help me understand the decode memory location vi..

 

Message Edited by krispiekream on 03-27-2009 01:19 PM

First you should remove all the standard VIs that come with NI-DAQ for LabVIEW installed. That would make it easier to see what VIs are actually custom made and would need to be investigated with almost magic power.

 

But seeing how the VIs lack any form of proper data flow and instead are working almost exclusively on global variables to pass data around my mind simply shuts down and refuses to look further. I'm very sorry! I almost wouldn't want to look at that code even if I would get paid to do so

 

The code in itself doesn't look to complicated. Just reading in some binary data and decoding the information in there in 26 word blocks. However the writing stye of this code looks like a not very good VB programmer trying to do LabVIEW code. Globals all over the place, complicated code sequences where simple boolean logic would do, etc, etc. I have also no idea what would be the top level VI in this VI library and suspect it to be not even there.

 

IMO, rewriting the code from scratch would be easier than trying to understand what it should do, which quite likely is different from what it does. Of course this assumes that there is a requirements specification other than this mess of LabVIEW code.

 

Rolf Kalbermatter

Message Edited by rolfk on 03-29-2009 10:58 AM
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
Message 5 of 12
(4,015 Views)
Solution
Accepted by topic author krispiekream

Propably you could log the inputs/outputs (or read/write to the globals) of the decodeing vi and then reverse engineer with that data.

 

Felix

0 Kudos
Message 6 of 12
(3,998 Views)
Do you at least have documentation on what the registers mean? Clearly the decoding is based on that, and I doubt you'll be able to get very far without knowing what the individual bits mean.
0 Kudos
Message 7 of 12
(3,985 Views)

i have sat down with the guy that worked with the programmer that wrote this code and he have no clue whats its doing..

i am to implement this new PDA into this labview program i am working with.

we are writing a VB on the PDA and the PDA will log this 8 memory registers and I am to take those 8 memory registers and read it into this code..

i think its the FRAME array in the subvi...

from that array, we decode the 8 memory locations. the VB programmer forgot what the 8 memory locations does because it wasnt documented and she doesnt know how to decode it

because our current program decode them.

so thats why i have to know what this program is doing in order to do anything further. i think the original labview programer is not here so we cant ask him..

 

 

Best regards,
Krispiekream
0 Kudos
Message 8 of 12
(3,968 Views)

krispiekream wrote:

i have sat down with the guy that worked with the programmer that wrote this code and he have no clue whats its doing..

i am to implement this new PDA into this labview program i am working with.

we are writing a VB on the PDA and the PDA will log this 8 memory registers and I am to take those 8 memory registers and read it into this code..

i think its the FRAME array in the subvi...

from that array, we decode the 8 memory locations. the VB programmer forgot what the 8 memory locations does because it wasnt documented and she doesnt know how to decode it

because our current program decode them.

so thats why i have to know what this program is doing in order to do anything further. i think the original labview programer is not here so we cant ask him..

 

 


Then you really are the assigned person to do this. I'm sorry but I'm not going to spend a lot of time to analyze such a mess! Especially since someone apparently thought that writing a specification in the first place is absolutely unneccessary. Is this a product of your company? I really don't hope so!

 

Rolf Kalbermatter

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 9 of 12
(3,963 Views)

hahaha. no..this is not the product..

this is part of a testing process..

we have a working one..thats because this consultant did it and we are upgrading and i am the one to do this mess..and i am still learning..

so i dont know..i guess i am stuck with it..

i decided to post this question because i thought that i dont understand labview enough to understand the code and hoping that if someone sees it and understand it right away becuase they have more experience..

this project is stressful...

Message Edited by krispiekream on 03-29-2009 07:02 PM
Best regards,
Krispiekream
0 Kudos
Message 10 of 12
(3,955 Views)