LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Rewriting Basic with LabView

Highlighted

Dear LabView Experts,

I am a new Labview user, in fact my only exposure to the program was when i was in college roughly 20years ago. Anyhow, i have a small LabView design project and i need help; I have to replicate a column strength test system that was originally developed with Basic Programing Language. Can anyone help provide guidance or support, i wouldnt mind paying for your time. By the way, if this is not the forum to leave this posting please advise. 

0 Kudos
Message 1 of 10
(1,356 Views)

If you are looking to pay somone to do the work for you, then you can post it in LabVIEW Job Openings

 

If you want to do it yourself, then I recommend starting out by thoroughly understanding how the BASIC program works so you can rewrite it.  Create a flow chart or summarize it in pseudocode.  If you can identify a particular architecture it follows, that would help.  For something like a "column strength test system", it sounds like it should be a state machine architecture, but whether the person who wrote the BASIC program had a decent plan as they were doing it,  or they just hacked something together and littered it with GOTO's as they went, is another question.

 

Start with documenting the inputs and outputs of your program.  What data are you required to give it?  What results does it output?  How does it interact with the physical hardware?  Any paricular appearances of the user interface you want to replicate, or perhaps improve?

Message 2 of 10
(1,347 Views)

Hi Jade,

 

Can anyone provide guidance

You need to understand BASIC (or atleast what this old program does) and you should know LabVIEW good enough to be able to replicate the algorithm. I would start with reading (or creating a good) description of that old algorithm and probably would draw a flow chart.

Based on flow chart and description/manual I would start to recreate the program in LabVIEW…

 

Can anyone provide support

To be able to support you you would need to provide the full source of your old BASIC tool…

 

Edit:

As I was writing my message RavensFan wrote too - and basically says the same.

That should be a good indication of needed work to you, Jade! 😄

Best regards,
GerdW
CLAD expired, using LV2011SP1 + LV2017 (+LV2019 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

Message 3 of 10
(1,340 Views)

@GerdW wrote:

Edit:

As I was writing my message RavensFan wrote too - and basically says the same.

That should be a good indication of needed work to you, Jade! 😄


Thanks Gerd.  Smiley Happy

 

Something I was thinking about while writing my message but didn't get to saying.  Depending on your requirements, you may not actually want to try to program a "line for line"  (or would that become a "line for wire"?Smiley Tongue) replacement of the BASIC program.  Certainly not if it is littered with GOTO's like I was saying.  Some things you may not be able to.  Some things you just should not because they were based on poor programming practices originally.  This is your chance to really improve on the mistakes of the past.

 

A couple more tips.  A subroutine or a function within a text based language is a subVI in LabVIEW?  Also, LabVIEW does not have "variables" the same way BASIC does.  The wire is the storage mechanism/data path for values.  If you need a value from one iteration of a loop carried into the next iteration, then you use a shift register or a feedback node.  If you find  your LabVIEW code becoming filled with sequence structures and local variables, it means you aren't doing it right.  That is the kind of code you see coming from people who have text-based programming background.

Message 4 of 10
(1,317 Views)

I'm in the middle of translating an old VB program I had written.  Often, what worked well for VB doesn't translate into what works well for LabVIEW.  Sometimes there just isn't an analog from one to the other.  I'll tell you one thing; if you're looking to sharpen up your LabVIEW skills, this will do it.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 5 of 10
(1,311 Views)

I thank you all for your immediate responses. fyi, I have already contacted someone whom I thought could handle the project, but I am getting a feeling that he's not that comfortable converting many of the Basic Language Algorithms into LabView format. Therefore, I don’t think it make sense to pay him for half of the work and have to pay someone else to figure out the Algorithms. Btw, I have the old Basic program and the old system is still in operation. What I am trying to accomplish is replicate the entire system part-for-part but use labview program to interface with it. If there is anyone who is well-versed with both programs and wouldn’t mind doing the required reverse engineering work and be available to offer support should slight adjustment be needed that’ll be appreciated. The primary objective is to make the new labview version function exactly as the old system. If you can help, please let me know.

A similar request is already posted on Labview job forum.

0 Kudos
Message 6 of 10
(1,290 Views)

Keep in mind also that after you have completed the translation, full regression testing is in order.  If this is a test, you may find that units that used to pass now fail and the other way around.  If the customer is nit-picky, they might even insist that you re-test their existing inventory - on your dime - if it is different enough.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 7 of 10
(1,260 Views)

@Jade_1 wrote:

...

 

 The primary objective is to make the new labview version function exactly as the old system. If you can help, please let me know.

A similar request is already posted on Labview job forum.


I have done those type of projects and on more than one occation the person who was responsible for the old code was as mystified as I was re: the the raw binary files and what was supposed to be in them.

 

They THOUGHT they had all of the source code...

 

In the end you will have to have a complete list of the fucntionality to test the new code.

 

Stepping back...

 

If you know what the GUI is supposed to look and know what verything does, that comprises the bulk of an application specification.

 

Do you suspect there is some "special sauce" (someone fudged things to get numbers they thought were right) in the application that will require duplicating the Basic code?

 

I ran into an example of that once (see here for the paper ) (sorry the right link may be here) where I had to apply AMCA Standard 210 to characterize the perfomance of air handlers. When you dig deep into the pages of math you get to point where it looked like they were using Newton's method to solve for a number and it turns out that could go on forever. The PhD in charged just said "when the difference between one iteration and the next is less than 0.1% then just go with that number.

 

So unless there is concern fo rthe special sauce the Basic code may not be as useful as one may think.

 

Ben

0 Kudos
Message 8 of 10
(1,229 Views)

The old code might be a good referrence, but if there's an old spec it's probably better. The point is that the remade program should solve the same problem and give the same result, not do a 1:1 translation.

Compare to bad and good translation of languages, it's better to get the feel and message across than do a litteral translation, if you sharks? (bad litteral/joking translation of "if you get it" from swedish, as case in point).

 

I assume there's sensor and some sort of DAQ? Start by creating functions to test and communicate with them. I assume the test itself it fairly straight forward.

 

Keep us posted on your progress. 🙂

/Y

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
Message 9 of 10
(1,179 Views)

Can you post email?

0 Kudos
Message 10 of 10
(1,115 Views)