Skip to content

How to create xVar

X Variable name

Tip

m_x< b | f | n | s >< NameVariable >

Info

Hungarian notation

  • m_ = Member
  • b = Bool
  • s = String
  • x = x variable
  • f = Float / Double
  • n = Integer / Long / Short ...
  • And NameVariable

Example

m_xfPickUp


Create Attribute

m_xfPickUp.Register( *m_poXAggregation, "PP_PickUp", CrXVar::GUIW_OWNR_INIPO, 0, -10.5, -16, 80);

Right click "Cc..." -> "New" -> "Attribute".

Screenshot

Give Attribute name

Example

m_xfPickUp

Configure Attribute

Right click VariableName -> Open Specification -> General: Visibility

Check Protected

Open Specification -> RegisterX -> Detail: Type

Choose variable type and click OK!

Screenshot


Variable name in GUI and INI files

m_xfPickUp.Register( *m_poXAggregation, "PP_PickUp", CrXVar::GUIW_OWNR_INIPO, 0, -10.5, -16, 80);

Tip

< PP | HP >_< VariableName >

Info

  • "PP_PickUp"= "PP_" Name to PARAMS.ini | DEFAULT.ini
  • "HP_PickUp"= "HP_" Name to HARDWARE.ini

PP - Process parameter

HP - Hardware parameter

Example

PP_PickUp


GUI OWN INI

m_xfPickUp.Register( *m_poXAggregation, "PP_PickUp", CrXVar::GUIW_OWNR_INIPO, 0, -10.5, -16, 80);

Tip

GUI< R | W | N >_OWN< R | W >_INI< HO | HF | DO | DF | PO | PF | NN >

Info

  • GUI - OPC client
  • OWN - Machine software applicatoin
  • INI - Ini file where xVar will be saved

  • R - Read

  • W - Write
  • N - Disable

  • HO - Hardware Optional

  • HF - Hardware Fixed
  • DO - Defaults Optional
  • DF - Defaults Fixed
  • PO - Params Optional
  • PF - Params Fixed
  • NN - Temporary xvar, not saved in any file

Example

GUIW_OWNR_INIPO


Values

m_xfPickUp.Register( *m_poXAggregation, "PP_PickUp", CrXVar:GUIW_OWNR_INIPO, 0, -10.5, -16, 80);

Tip

valueMS, valueDefault, valueMin, valueMax

valueMS, bool

valueMS, string

Info

  • First number: Time refresh in MS (0 = Fast refresh read XVariable)
  • Second number: Default value
  • Third number: Min value
  • Fourth umber: Max value

Example

0, -10.5, -16, 80

0, false

0, "some text"

How to get value of xVar

to use the value stored in x variable use method Get()

Example

m_xtypeVarName.Get()