DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How do i use commands in autosequence to bring data into a graph?

i can graph all my data manually by right clicking and going to new entry, but i need it to be automatically done when i use "run a file" in autosequence. I can also bring in a graph template that is already made (just a blank graph with all my settings).
0 Kudos
Message 1 of 4
(2,789 Views)
Hi,

I'm not sure if you are talking about the VIEW or the GRAPH module, so I have listed solutions for both modules:

For VIEW:

Call VIEWLAYOUTLOAD("REG_1A")

Call VIEWOBJOPEN(VWAXISOBJNAME(1)) ' open first axis object of layout
Do While VWCURVEOBJCNT>0 ' check and delete 'old' curves
Call VIEWOBJDELETE(VWCURVEOBJNAME(1))
Loop
Call VIEWOBJNEW("2D-Curve", "Curve1") ' create first curve object
Call VIEWOBJOPEN(VWCURVEOBJNAME(1)) ' open first curve object
VWCURVECHNX=1 ' select x-channel
VWCURVECHNY=2 ' select y-channel
VWCURVECOLOR="red" ' select curve color
Call VIEWOBJCLOSE(VWCURVEOBJNAME(1)) ' close first curve objec
t
Call VIEWOBJCLOSE(VWAXISOBJNAME(1))
Call VIEWUPDATE() ' show/redraw View window

In GRAPH, this is actually much easier.

You can create a template that already contains all the references to the channels. If you want to change these, this is the code:

GRAPHObjOpen('2DAxis1');
GRAPHObjOpen('2DObj1_Curve1');
D2CCHNX := 'X-Channel';
D2CCHNY := 'Y-Channel';
GRAPHObjClose('2DObj1_Curve1');
GRAPHObjClose('2DAxis1');

Let me know if this helped or if you are looking for something more specific. Your question is quite general, si I'm not sure this is exactly what you are looking for.

Otmar
Otmar D. Foehner
Viviota Inc.
Message 2 of 4
(2,789 Views)
The problem you are describing is due to DIAdem not capturing the changes made in your GRAPH template while recording the Autosequence. This is its default behaviour. To solve this, you can enter the missing code manually in the Autosequence (as Otmar suggested) or use the CTRL+A trick.

During the recording, whenever you open a GRAPH object dialog (to select the signals to plot, enter a label, etc) press CTRL and A keys simultaneously before closing the dialog. You will need to do this for every dialog you open, even if these are nested.

CTRL+A will tell DIAdem to record the dialog parameters into the Autosequence. So in effect you will get code similar to that described by Otmar, except you don't have to enter it hand!

CTRL+A also works when not in Autoseque
nce recording mode. In this case it copies the dialog variables and parameters into the Windows clipboard, so you can paste these into your A/S editor. This is useful when programming the A/S by hand, as often it is difficult to find a particular variable name by looking at DIAdem's on-line help.
Message 3 of 4
(2,789 Views)
need to explicitly mention the programatic creation in VBS of a curve if it does not exist yet.
(.e.g Call GraphObjNew("2D-Curve", '2DObj1_Curve1') prior to calling Call GRAPHObjOpen('2DObj1_Curve1')
0 Kudos
Message 4 of 4
(2,789 Views)