Examples for searching by using the object browser

Good to know

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/lightbulb.svg The following examples on using the search functionality of the object browser will help you to improve your understanding of the searching functionality. Observe the following:

  • The examples are based on a project that has been created by using the project templace Moving light (PiFace required). If you create such a project within logi.CAD 3 (see "Creating new project") and you enter the search parameters within the object browser, you will get the same matches.
    You do not need a Raspberry Pi and no PiFace in order to reproduce the matches when using the search functionality of the object browser.

  • The search parameters are highlighted in bold within the matches for a better understanding. These highlighting is not provided within the object browser itself.

  • The columns of the object browser already provide some pieces of information to usually conclude on the object type. If you are in doubt, just double-click the match in order to browse to the ojbect within the application.

  • See "Objects supported for searching with object browser" for the extent of the searching process.

  • If you miss an important example or you have some questions on the examples, please contact the support team of logi.cals. logi.cals will try to include your proposals/questions into this article.

Examples to start with

The following examples establish a basic understanding on the search functionality of the object browser.

Searching for objects with a name

The search parameter shift in column Name searches for all objects containing shift in its name. 12 matches are found.
images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/warning.svg It is not necessary to enter wildcards at the beginnung or at the end of the search parameter.

shift




Name

Type

Parent

Parent Type

MovingLight_ShiftPatternAccordingToShiftDirection

User function



shiftLeft

BOOL

MovingLight_Data

Structure data type

shiftLeftTrigger

R_TRIG

MovingLight_SetModesAccordingToInputs

User function block

shiftRightTrigger

R_TRIG

MovingLight_SetModesAccordingToInputs

User function block

switchShiftLeft

BOOL

MapInputsToVariables

User function

switchShiftLeft

BOOL

MovingLight_SetModesAccordingToInputs

User function block

switchShiftLeft

BOOL

RaspberryMovingLight

Program

switchShiftLeft

BOOL

MovingLightSimulation

Program

switchShiftRight

BOOL

MapInputsToVariables

User function

switchShiftRight

BOOL

MovingLight_SetModesAccordingToInputs

User function block

switchShiftRight

BOOL

RaspberryMovingLight

Program

switchShiftRight

BOOL

MovingLightSimulation

Program

Searching for objects with a name incl. wildcards %

The search parameter shift%ft in column Name searches for all objects containing shift in its name and after that ft. 7 matches are found.
images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/warning.svg It is not necessary to enter wildcards at the beginnung or at the end of the search parameter. % within the search parameter is a placeholder for any set of characters.

shift%ft




Name

Type

Parent

Parent Type

MovingLight_ShiftPatternAccordingToShiftDirection

User function



shiftLeft

BOOL

MovingLight_Data

Structure data type

shiftLeftTrigger

R_TRIG

MovingLight_SetModesAccordingToInputs

User function block

switchShiftLeft

BOOL

MapInputsToVariables

User function

switchShiftLeft

BOOL

MovingLight_SetModesAccordingToInputs

User function block

switchShiftLeft

BOOL

RaspberryMovingLight

Program

switchShiftLeft

BOOL

MovingLightSimulation

Program

The search parameter s%shift%ft in column Name searches for all objects containing first s in its name, after that shift and then ft. 4 matches are found.

s%shift%ft




Name

Type

Parent

Parent Type

switchShiftLeft

BOOL

MapInputsToVariables

User function

switchShiftLeft

BOOL

MovingLight_SetModesAccordingToInputs

User function block

switchShiftLeft

BOOL

RaspberryMovingLight

Program

switchShiftLeft

BOOL

MovingLightSimulation

Program

Searching for objects with a name and type

The search parameter shift%e in column Name and bool in column Type searches for all objects containing shift in its name and then e and the data type of which is BOOL. 5 matches are found.

shift%e

bool



Name

Type

Parent

Parent Type

shiftLeft

BOOL

MovingLight_Data

Structure data type

switchShiftLeft

BOOL

MapInputsToVariables

User function

switchShiftLeft

BOOL

MovingLight_SetModesAccordingToInputs

User function block

switchShiftLeft

BOOL

RaspberryMovingLight

Program

switchShiftLeft

BOOL

MovingLightSimulation

Program

The additional search parameter user in column Parent Type restricts the search to the objects that are declared within user-defined →functions or →function blocks. Now 2 matches are found.

shift%e

bool


user

Name

Type

Parent

Parent Type

switchShiftLeft

BOOL

MapInputsToVariables

User function

switchShiftLeft

BOOL

MovingLight_SetModesAccordingToInputs

User function block

Searching for objects with a type incl. wildcard name % or _

The search parameter u%int in column Type searches for all objects the →data type of which is UDINT, UINT, ULINT or USINT. logi.CAD 3 finds many matches because the objects from the system functions and function blocks are found as well.
images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg % within the search parameter is a placeholder for any set of characters. Hence, the data type UINT is considered for this search.


u%int



Name

Type

Parent

Parent Type

BCD_TO_UDINT

UDINT

BCD_TO_UDINT

System function

BCD_TO_UINT

UINT

BCD_TO_UINT

System function

BCD_TO_ULINT

ULINT

BCD_TO_ULINT

System function

BCD_TO_USINT

USINT

BCD_TO_USINT

System function

BITRATE

UDINT

CAN_setBitrate

System function

...




The search parameter u_int in column Type searches for all objects the data type of which is UDINT, ULINT or USINT. Again, logi.CAD 3 finds many matches because the objects from the system functions and function blocks are found as well.
images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg _ within the search parameter is a placeholder for any character but exactly one. Hence, the data type UINT is not considered for this search.


u_int



Name

Type

Parent

Parent Type

BCD_TO_UDINT

UDINT

BCD_TO_UDINT

System function

BCD_TO_ULINT

ULINT

BCD_TO_ULINT

System function

BCD_TO_USINT

USINT

BCD_TO_USINT

System function

BITRATE

UDINT

CAN_setBitrate

System function

...




The additional search parameter user in column Parent Type restricts the search to the objects that are declared within user-defined functions or function blocks. Now 1 match is found.


u_int


user

Name

Type

Parent

Parent Type

idx

USINT

PrepareString

User function

Continuing examples

The following examples provide additional tips on how to use on the search functionality of the object browser.

Searching for objects within user-defined function blocks and/or functions

The search parameter MovingLight in column Parent and the search parameter user in column Parent Type searches for all objects that are declared within a user-defined function or function block, if the name of this function or function block contains MovingLight. logi.CAD 3 finds matches that are variables of function block instances (see column Type).



MovingLight

user

Name

Type

Parent

Parent Type

cycleModeTrigger

R_TRIG

MovingLight_SetModesAccordingToInputs

User function block

data

MovingLight_Data

MovingLight

User function block

data

MovingLight_Data

MovingLight_SetModesAccordingToInputs

User function block

data

MovingLight_Data

MovingLight_HandleDirectionChange

User function

data

MovingLight_Data

MovingLight_ShiftPatternAccordingToShiftDirection

User function

data

MovingLight_Data

MovingLight_WritePatternToOutput

User function

invertTrigger

R_TRIG

MovingLight_SetModesAccordingToInputs

User function block

...




images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg Sort the column Parent in order to group the objects per name of the function and function block.

Searching for objects within programs

The search parameter pro in column Parent Type searches for all objects that are declared within a →program. logi.CAD 3 finds matches that are →variables or →function block instances (see column Type).




pro

Name

Type

Parent

Parent Type

movingLight

MovingLight

RaspberryMovingLight

Program

movingLight

MovingLight

MovingLightSimulation

Program

outLedPattern

BYTE

RaspberryMovingLight

Program

outLedPattern

BYTE

MovingLightSimulation

Program

...




images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg Sort the column Parent in order to group the objects per name of the program.

Searching for objects within resources

The search parameter res in column Parent Type searches for all objects that are declared within a →resource. logi.CAD 3 finds matches that are →global variables or program →instances (see column Type).




res

Name

Type

Parent

Parent Type

DigitalIn1

BOOL

raspberry

Resource

DigitalIn2

BOOL

raspberry

Resource

DigitalIn3

BOOL

raspberry

Resource

...




MovingLightSimulation

Program instance

RaspberrySimulation

Resource

RaspberryMovingLight

Program instance

raspberry

Resource

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg Global variables of a global-object are not found in this example because there are no global-objects within the project. But observe the note under "Objects supported for searching with object browser" for such global variables.

Searching for objects within configurations

The search parameter con in column Parent Type searches for all objects that are declared within a →configuration. logi.CAD 3 finds matches that are resources (see column Type).




con

Name

Type

Parent

Parent Type

raspberry

Resource

RaspbianConfiguration

Configuration

RaspberrySimulation

Resource

SimulationConfiguration

Configuration

Searching for data types

The search parameter typ in column Type searches for all declared data types. logi.CAD 3 finds matches in the project incl. the system data types.


typ



Name

Type

Parent

Parent Type

_INITSTEPTYPE

Structure data type



_STEPTYPE

Structure data type



CAN_RETURN_CODE

Type



CAN_TRIPLESAMPLING_VALUE

Type



GPIOPinFlags

Type



MB_PARITY

Type



MovingLight_Data

Structure data type



MQTT_RC

Type



MQTT_SUBSCRIBER_STATE

Type



images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg MovingLight_Data is a user-defined data type, all other data types are system data types (_INITSTEPTYPE and _STEPTYPE are internal system data types).

Searching for array variables

The search parameter array in column Type searches for all declared →Array variables. User-defined array data types are not searched for. logi.CAD 3 finds many matches because the objects from the system functions and function blocks are found as well.


array



Name

Type

Parent

Parent Type

A

ARRAY[*] OF ARRAY[*] OF ANY_UNSIGNED

MAX_2D_ARRAY_ULINT

System function

...




DATA

^ARRAY[0..7] OF BYTE

CAN_send

System function

...




DataInput

ARRAY[0..3] OF WORD

MB_WriteAndReadRegisters

System function

...




pin_values

ARRAY[0..7] OF BOOL

I2C_PCF8574_write

User function

SUB_2D_ARRAY

ARRAY[*] OF ARRAY[*] OF ANY_NUM

SUB_2D_ARRAY

System function

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg To better understand these matches, observe the notes under "Objects supported for searching with object browser" for user-defined data types, multi-dimensional array, reference variables and system functions for I2C-elements.

Searching for reference variables

The search parameter ^ in column Type searches for all declared →reference variables. logi.CAD 3 finds matches from the system functions and function blocks only because no reference variables are declared within the example.


^



Name

Type

Parent

Parent Type

DATA

^ARRAY[0..7] OF BYTE

CAN_send

System function

DATA

^ARRAY[0..7] OF BYTE

CAN_recv

System function

GET_BYTE_REF

^BYTE

GET_BYTE_REF

System function

payload

^BYTE

MQTT_Receive

System function

payload

^BYTE

MQTT_Publish

System function

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/information.svg To better understand these matches, observe the note under "Objects supported for searching with object browser" for reference variables.

Workaround: Searching for calls of a function or of a function block

images/s/b2ic8e/9012/1ca6q62/_/images/icons/emoticons/error.svg →Calls of a function or of a function block are not found by the object browser. However, the object browser provides a possibility to browse to the declaration. There you are able to search for the references (= calls) of the function or a function block.

  1. Enter the name of the function (e.g. BIT_SET) or the function block (e.g. R_TRIG) in column Name.
    Example 1:

    BIT_SET




    Name

    Type

    Parent

    Parent Type

    BIT_SET

    System function



    BIT_SET

    ANY_ELEMENTARY

    BIT_SET

    System function

    Example 2:

    R_TRIG




    Name

    Type

    Parent

    Parent Type

    invertTrigger

    R_TRIG

    MovingLight_SetModes...

    User function block

    R_TRIG

    System function block



  2. Double-click the appropriate match in order to browse to the declaration of the function or function block.

  3. Use the context menu command Find References and use the Search view in order to go to the references.

    Programming language

    Details on this command

    →ST

    See "Finding references for element"

    →FBD

    See "Finding references (= usages) for an element"