03-27-2009 10:39 AM
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.
Solved! Go to Solution.
03-27-2009 12:00 PM - edited 03-27-2009 12:04 PM
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...
03-27-2009 01:05 PM
03-27-2009 01:12 PM - edited 03-27-2009 01:19 PM
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..
03-29-2009 03:50 AM - edited 03-29-2009 03:58 AM
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
03-29-2009 07:52 AM
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
03-29-2009 10:17 AM
03-29-2009 03:37 PM
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..
03-29-2009 04:19 PM
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
03-29-2009 06:53 PM - edited 03-29-2009 07:02 PM
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...