Recipe Send-To from a Text Variable

<< Click to Display Table of Contents >>

Navigation:  Recipes >

Recipe Send-To from a Text Variable

Previous pageReturn to chapter overviewNext page

 

Note that the word 'String' means the same as 'Text variable'.

 

The normal Recipe Manager Send -To invokes the Routing box that has the source on the left and the compatible targets on the right, one or more of which can be chosen to redirect the recipe to.

 

RecipeSendToString1

 

When implementing Recipe Send-To from a string, unfortunately there is no space on any of the Dialog Boxes to enter or choose the String to be used, so it has to be done from a setting inside SETTINGS.INI

 

To Start with, the recipe itself must come from a String, and that can be specified in the the Button/StrategyAction as previously discussed using the SETTINGS.INI setting:

 

[Recipe]

DownloadFromStringEnabled=Y

 

That enables the picking of SpecView Strings as the name of the recipe to be downloaded, see next screenshot where this has been used:

 

The Button/Strategy Action needs to be a Download Specific Recipe type.

 

RecipeSendToString2

 

The AutoDownload string in the above example will contain the name of the Recipe on the screen SPECVIEW1.GD3

 

The AutoSendTo  string will contain the name of the instrument to send-To – one from the Right column in the diagram on the previous page, e.g. DTB1, DTB2 or DTB3.

 

To make the Send-To work from a string, another setting is needed in SETTINGS.INI, add the section if it is not already there:

 

[RecipeAutoSendToStrings]

SPECVIEW1=AutoSendTo

DisplayErrors=Y

 

This says that the screen SPECVIEW1 will automatically Send-To the instrument whose name is in the String AutoSendTo

 

It also shows that any errors are to be displayed on the screen – otherwise just Event Log shows the errors.

 

If the AutoSendTo String is blank, then the Routing Dialog is displayed as with a normal Send-to, but if the String contains the name of one of the instruments on the right side of the Routing box, then that is automatically used instead of displaying the Routing box.

 

The Name of the instrument is case sensitive, so it must be specified exactly as it would appear in the right side of the Routing table.

 

So here are the steps to set this up:

 

Have a Recipe Screen (SPECVIEW1 in these examples).

 

Have a SpecView String that will contain the name of the recipe to be downloaded ( AutoDownload in this example).

 

Have another String that will contain the name of the Instrument to Send-to ( AutoSendTo in this example).

 

Test the recipe screen using a normal Send-To button type to check the Routing table Right hand side to make sure the names are as expected.

 

Put BOTH strings on an open screen somewhere – the recipe screen itself (SPECVIEW1) does not have to be open, but the two Strings must be on a screen that is always open.

 

Define a button or Strategy Action to Download a Specific Recipe on the screen, and choose the String from the

%% AutoDownload %%  that shows up in the list, see the diagram above.  If the %% items do NOT appear then edit SETTINGS.INI and add:

[Recipe]

DownloadFromStringEnabled=Y

 

Once the manual recipe download and send-to has been tested, then enable the AutoSendTo:

[RecipeAutoSendToStrings]

SPECVIEW1=AutoSendTo

In SETTINGS.INI to allow the system to take over the Send-To.

 

NOTE: The button or Strategy Action must NOT be a Send-To type, just a normal Download Specific Recipe.

 

 

Important notes:

The Strings must be on a screen that is open when the button or Strategy Action runs, otherwise the values will not be defined and it will not work.
Only one instrument can be in the String to Send-To – to do Send-To multiple times they must be done one after the other.
Only one instrument is allowed on the left side of the routing table - if there are more than one then the auto-send to will not operate because it is not possible to specify the destination for more than one instrument at a time.

 

If the name in the String is not correct, then an error message will be displayed and recipe send will fail:

 

RecipeSendToString3