HP VXI 75000 C Series User's And Scpi Programming Manual page 170

Algorithmic closed loop controller
Table of Contents

Advertisement

ALGorithm
Notes
170 HP E1415 Command Reference
<alg_name> specifies either an algorithm name or 'GLOBALS'.
OK
*RST
ALG:DEF 'GLOBALS','static float My_global;'
Error
*RST
ALG:DEF 'GLOBALS','static float My_global;'
"No error"
ALG:DEF 'GLOBALS','static float A_different_global'
"Algorithm already defined"
Error
*RST
ALG:DEF 'ALG3','PIDA(I100,O108)'
"No error"
ALG:DEF 'ALG3','PIDB(I100,O108,O124.B0)'
"Algorithm already defined"
4. If <alg_name> has been enabled to swap (originally defined with the
<swap_size> parameter included) then the <alg_name> can be re-defined (do
not include <swap_size> now) either while the module is in the Trigger Idle
State, or while in Waiting For Trigger State (INITed). Here <alg_name> is an
algorithm name only, not 'GLOBALS'.
OK
*RST
ALG:DEF 'ALG3',200,'if(O108<15.0) O108=O108 + 0.1; else O108 = -15.0;'
INIT
ALG:DEF 'ALG3','if(O108<12.0) O108=O108 + 0.2; else O108 = -12.0;'
ALG:UPDATE
"No error"
Error
*RST
ALG:DEF 'ALG3',200,'if(O108<15.0) O108=O108 + 0.1; else O108 = -15.0;'
INIT
ALG:DEF 'ALG3',200,'if(O108<12.0) O108=O108 + 0.2; else O108 = -12.0;'
"Algorithm swapping already enabled; Can't change size"
Because <swap_size> included at re-definition
1. Channels referenced by algorithms when they are defined, are only placed in
the channel list before INIT. The list cannot be changed after INIT. If you
re-define an algorithm (by swapping) after INIT, and it references channels
not already in the channel list, it will not be able to access the newly
referenced channels. No error message will be generated. To make sure all
required channels will be included in the channel list, define <alg_name> and
re-define all algorithms that will replace <alg_name> by swapping them
before you send INIT. This insures that all channels referenced in these
algorithms will be available after INIT.
Because 'GLOBALS' already defined
Because 'ALG3' already defined
starts algorithm
Required to cause new code to run
starts algorithm
Chapter 6

Advertisement

Table of Contents
loading

This manual is also suitable for:

Vxi e1415a

Table of Contents