LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labview

Hello

in the labview it joined the project, the al extreme right tables are actually the output of read visa (tension, intensity that has read the stallion and instrument) I want to export to excel and I would like to make the somewhat Application more generic transforming the visa write entries to the penny niveu VI instrument in an .xml file has the grace attached labview function of the way
Content of the first XML tag (order concerning intensity) goes to buffer write the first visa write the contents of the 2nd XML tag (the command for voltage) goes Buffer write the read visa 2nd and so on up a command regarding the frequency to the last write buffer visa) .This will allow user to add al of other instruments (clients) that it can calibrate, simply write in a xml file for orders (intensity, voltage, phase shift, frequency) of the said instrument.
What do you think ?

Download All
0 Kudos
Message 1 of 9
(3,626 Views)

I think you have a jumbled mess of code that can be greatly improved (in readability, which means both you and other people will be able to see and understand it better).  Here are some specific suggestions:

  • Instead of putting everything into one big VI, adopt a hierarchy, where "messy details" are buried in sub-VIs.
  • Use Clusters to bundle parameters together, and be sure to create a TypeDef (and use it) for every Cluster that you create.  An example would be a cluster of the Tensions, Frequencies, Intensities, Phases, for Applied and Etalon that could be assembled into a single Array (tableau) in the Triphase case.  I haven't looked carefully, but there are a similar set of outputs from the Monophase case -- if they are largely the same, consider using a single Cluster, and naming the Arrays differently.  Many fewer wires makes for much smaller Block Diagrams, and the ability to see an entire Block Diagram all at once makes the logic (seen in the pattern of Structures) much more evident.
  • Try to avoid using Frames (or Sequences) -- instead, use Data Flow principles (including using the Error Line to serialize functions and VIs).
  • Another "space-saving" trick is to "uncheck" "View as Icon" for controls and indicators on the Block Diagram.  Whenever I set up LabVIEW for myself or my colleagues, I got into Tools, Options, and on the Block Diagram Page, I uncheck "View as Icon".
  • An example of a "messy detail" that doesn't need to be seen in your main VI is VISA initialization, particularly if all of the parameters are constants.  Hide all of this in a 32x32 pixel sub-VI, bringing in only the VISA Name.
  • Use Format into String (with a suitable Format String) to build a Command instead of concatenating the Command from many pieces, most of which are Constants.

I'm sure there are other suggestions, but your Block Diagram was so large and unwieldy (even the Diagram Cleanup tool didn't help much) that I'm forced to stop here.  Allow your Diagram to be made smaller and thus more "viewable" (see above) and more help will be available.

 

Bob Schor

Message 2 of 9
(3,609 Views)

Great,Thank you very much for this response.

0 Kudos
Message 3 of 9
(3,590 Views)

Ok ,the idea of clusters is interesting to arrange all the stuff of tables but how can i do it for example to gather the tables of SRS monophasé?

0 Kudos
Message 4 of 9
(3,522 Views)

Start at the beginning.  You only provided Le Vrai without its numerous sub-VIs, such as SVI Etalon and SVI SRS (if you want to provide more VIs, and especially if your code is wrapped inside a LabVIEW Project that, in turn, is contained in a single Folder, with possible sub-folders, compress the Folder and attach the resulting .ZIP file).

 

A good LabVIEW Programming Practice is to have all of the sub-VIs that you develop use the same Connector Pane, specificially the 4-2-2-4 Pane, with Error In on the lower left and Error Out on the lower right.  Instead of bringing 4-8 single (unnamed) wires out of, say, SVI Etalon, build them into a single Cluster (and be sure to create a TypeDef for the Cluster).  Now SVI Etalon has two wires going in (Refnum VISA and Error In) and two wires coming out (whatever you name your output Cluster and Error Out).  Do something similar for SVI SRS, which will have a different Cluster Out.  Now you can bundle these two sub-Clusters into a single Output Cluster for your For loop and have a single Cluster wire that emerges as an Array of Clusters, going to a single Array Indicator.

 

Incidentally, I question the number of Error Terminals you have.  You may want to branch the Error Line, but it should be re-merged.  The Error Line is often the "signal" of sequential action and indicates (and enforces) Data Flow.  Certainly almost every sub-VI you write should have Error In and Error Out, and use them internally (they are there for an important reason).

 

Bob Schor

Message 5 of 9
(3,512 Views)

In addition to what Bob said, you need to do something about the front panel. Nobody has a monitor that is 24138 x 9563 pixels big! (231 Megapixels!!!!)

Your front panel covers the area of well over 100 1080p screens so there is less than a 1% chance that we see what we need to see.

Message 6 of 9
(3,492 Views)

Yes ,Thanks for your response however how it can be?

0 Kudos
Message 7 of 9
(3,487 Views)

@Maroua wrote:

Yes ,Thanks for your response however how it can be?


What is your question? What is "it"?

 

(Also, next time use a descriptive title for your thread. Since this is a LabVIEW forum, 99% of all discussions are about LabVIEW. A subject of "labview" is redundant and completely useless.) 

Message 8 of 9
(3,476 Views)

Well, I'm attaching Le Petit Vrai, your VI with a much smaller Front Panel.

 

Here's what I did:

  • Turn on the Navigation Window, found on the View Command (at the top of the Screen).  This shows the entire (enormous) Front Panel, with a (small) White area corresponding to the part being viewed.
  • One problem is that you have over-used Tab Controls, nesting them three or four deep.  [I used to use Tab Controls, as well, until I started hearing from better LabVIEW Programmers that they were almost always a "bad idea"].  A Tab Control has to contain all of its elements, so if they are "scattered", you cannot shrink the Tab Control until you move its elements closer together.
  • Now go look in the Corners and Edges of your enormous Front Panel for Controls and Indicators that were probably created inside an enormous Block Diagram and ended up at random locations (far apart) on the Front Panel.  Grab them and drag them towards the center.
  • After doing a lot of this, I got things down to 6 1920x1080 screens (from 100).  Think about whether you really need all these controls and indicators (probably not).  Think about how to display them in a compact fashion (Clusters, Arrays, etc.).  Arrays take up a lot of Front Panel space, particularly with their Indices.  Do you really need to see the values in the Array?  If you have them there just for debugging purposes, consider using Probes instead (they vanish nicely when you aren't using them).

Bob Schor

Message 9 of 9
(3,469 Views)