LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

system config help

Hi,

I am stuck on this problem,

I was wondering if someone can give me some ideas on approaching this problem.

as of right now, I have 5 test systems that are very similar.

all of this 5 system uses 1 software that handles all 5 systems.

to determine what configuration to setup the system, i call for an external file and gets its input to config the serial port, etc.

This version that i have is configured for 5 systems, but not for additonal system without modifying the software. 

in order for me to add new system, i would have to edit the ring properties and that changes the software, and that needs more validation that i dont want to deal with.

can someone guide me into figuring out how to include more systems with the current setup that i have without having to modify my code in the future.

 

here is my diagram.

 

 i get a file from a folder with the test station  id. match the filename with colum 0 of the setup file. and if it matches, then give test system number from 0-4 for system 1,2,3,4,5.

ex.

system 1 = 12345-001

system 2 = 12345-002

system 3 = 54321-001

system 4 = 54321-002

system 5 = 54321-003

 

how would i created system 6 of 12345-003,

or system 7 of 54321-004 

 

without having to edit the ring properties?

 

Find_CPU_NAME.vi

 untitled.PNG

 

 Main Vi

 

Test Sequence gives value of 0-4 and that determines how to configure the system.

 

untitled.PNG

 

 

I guess my question is ..

can I change my ring properties dynamically.

how do i programmically add to a ring property.

without having to "edit items"

 

Message Edited by krispiekream on 05-17-2010 06:48 PM
Best regards,
Krispiekream
Download All
0 Kudos
Message 1 of 8
(2,978 Views)

krispiekream wrote:

[...]
I guess my question is ..

can I change my ring properties dynamically.

how do i programmically add to a ring property.

without having to "edit items"


Like this:

Find_CPU_name_BD.png

Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice
For he does not know what will happen; So who can tell him when it will occur? Eccl. 8:7

0 Kudos
Message 2 of 8
(2,949 Views)

This may sound like a stupid question, but what is wrong with (a *.ini file - read key value,) :

1) convert decimal value into a type def enum

2) Enum goes into case structure,

3) Each case of the case structure (self documenting code) outputs the test system required.

 

(Enum could even be test system required)

 

Which ever way you do it, you have to recompile every time you add a machine or change the function of the machine.

Storing the Test System type directly on the machine is much easier to update than in the code as if a machine changes it's function, or a new machine is added to the system.

 

Do you have a very good reason for this implementation Krispy?

This is looking suspiciously like Rube Goldberg to me. Smiley Wink

 

James

Message Edited by James W on 05-18-2010 12:05 PM
CLD; LabVIEW since 8.0, Currently have LabVIEW 2015 SP1, 2018SP1 & 2020 installed
Message 3 of 8
(2,939 Views)

I think I have a good reason for doing this,

because the old programmar did it this way and i want to fix the least amount of code as possible while keeping the same structure of the current code.

meaning that all the configuration should be on setup file and set ports/serial from that file.

i can easily change the code everytime we have a new system, but validating code is very hard to do in our company.

 

Best regards,
Krispiekream
0 Kudos
Message 4 of 8
(2,924 Views)

A word of caution:

 

there is one "minor" differance between enums and ring controls.  You CAN change the strings[] in rings while running.  You cannot change the strings[] in enums while running.

 

So- if you use an enum to hold your "list of active stations" you need to recompile for each added station.  if you chose to use a ring you can populate "list of active stations".strings[] from your configuration file. 

 

As an aside- A configuration file could be in almost any format (See This thread for a brief discourse on preferances and a good nuggetette from DFGray)

Selecting the best (for you) format is going to be worth the development investment.  you may want to reevaluate the limits imposed by the existing model and bump up changing the file structure from "maybe someday" to "potential for immediate development" Smiley Wink


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 8
(2,908 Views)

can you show me in a diagram of what you mean?

how would i make a list on the ring from the file name.

i apparently went another route and not use enum or ring.

 

it works for me.

 

 

untitled.PNG

Message Edited by krispiekream on 05-18-2010 11:07 AM
Best regards,
Krispiekream
0 Kudos
Message 6 of 8
(2,895 Views)

Is this what you mean?

ALLOW UNDEFINED VALUES AT RUNTIME?

 

untitled.PNG

Best regards,
Krispiekream
0 Kudos
Message 7 of 8
(2,887 Views)

In this thread I and the OP developed a "released test launchpad".  It used a config file to hold a list of "test" names and vi's that performed the test.  the ini file was used to populate a ring control that allowed the user to select the "test" to launch.

 

In fact that little vi grew into a "feature" that I use to extend capabilities of test apps that I ship.  Customers allways seem to want something on top of the test like "It would be nice if I could programmatically see the variation of param x in my data without maniplulating the data file in excel"  <Poof> Graph parameter x.vi shows up as an option without recompiling the test application.  Kinda neat reallySmiley Very Happy


"Should be" isn't "Is" -Jay
0 Kudos
Message 8 of 8
(2,876 Views)