Jump to content

Read FW Version from PCB board.


Recommended Posts

Hi. We are now building machine with 16 pcb boards (Module 1-Module 16) using Labview. Each pcb board has its own firmware version but with similar code. Now, the labview only read and show for 1 pcb board. what is the best way to read each module and shown it in the interface?

Version 2 in the second picture is the string output of the version.

Thank you.

image.png.eccf8c5ae3ad438cdd009379e2b99059.pngimage.png.59483dea6a5fd48acf5d478c8e68d7c8.png

Link to comment

Well. Posting a an image of a small section of your program means we have to guess a lot but here we go.

There is no "best way" to display the information but probably the easiest is as an array of clusters.

image.png.59787d950a7310cfa6134aefd888cfc6.png image.png.84072800730215a21eb7d4c786af2961.png

modules.vi

As for reading the modules, that depends on the devices but guessing that your "Code" string is a long list of module capabilities and information (one of which being the version) encoded as hex; ultimately you will probably need an array of "Code" strings instead of a single "Code" string  - one element for each of the PCB's queried.

It looks, from your image, like you will have to refactor. When you do, get rid of that monster "Index array Element" and use a VI to splice (see below) the needed data inside of the big case structure. That will greatly improve the readability of your code and localise transformations/calculations to the specific case. It will also enable to create sub VI's to make your code more modular because, in this particular VI, you will just be passing the Code string into the big case structure. This will help enormously when you come to iterate over an array of "Code" strings.

 

image.png.c2167a8c83da3b9fc0e8590f4a3aebce.png

 

splice string.vi

Edited by ShaunR
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.