Terius96 Posted March 17, 2022 Report Share Posted March 17, 2022 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. Quote Link to comment
infinitenothing Posted March 17, 2022 Report Share Posted March 17, 2022 Can you give us more details on what hardware you're using. Attach a VI instead of a screenshot. Quote Link to comment
ShaunR Posted March 17, 2022 Report Share Posted March 17, 2022 (edited) 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. 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. splice string.vi Edited March 17, 2022 by ShaunR Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.