Jump to content

C to Labview conversion


Recommended Posts

Hi every one

I am in a process of converting some C code to LabView. The problem is that my C programming is poor so I am having some problem in translating the C code to LabView. There are no comments available on the program. If any one can help me and convert it for me to LabView, it would be greatly appreciated.

Thank you in advance

Link to comment

QUOTE (subasa @ Nov 24 2008, 08:18 AM)

Hi every one

I am in a process of converting some C code to LabView. The problem is that my C programming is poor so I am having some problem in translating the C code to LabView. There are no comments available on the program. If any one can help me and convert it for me to LabView, it would be greatly appreciated.

Thank you in advance

I don't think your problem is your skill in C programming, since the code you posted appears to be VisualBasic.

Link to comment

QUOTE (subasa @ Nov 24 2008, 09:53 AM)

Thanks for the insight. I though it was C but even if it's Visual Basic it doesn't help me much, I am not an expert in programming. I can understand LabView but not C or Visual Basic. So any help would be great.

I recommend working through the code line by line. There's a alot of overhead in there, so the actual code is not that much. Use Google and online pages for specific information on VB functions.

e.g. DIM is simply a declaration/allocation of a variable that will be used later in the code.

Begin and End mark a specifc section of code.

VB does use objects with their own properties and methods. For example dlg is declared as a UserDialog object.

Dim dlg As UserDialog

Therefore you will see calls to the properties and method of that object. (' marks a comment line)

' set defaults for dialogdlg.probe_name="probe"'dlg.distance = "60."dlg.phase_min = "0."dlg.phase_max = "-699.5"dlg.fmax="25.00"dlg.probe_name_pec = "probe"dlg.modfile ="3_hexa_structure_PEC"dlg.fmin = "0"

You can also pass an object to another function.

'MsgBox datafileDialog dlg

As you get going, post specific questions here.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.