Please enable JavaScript to view this site.

Function to check if I/O status is forced.

Syntax

i32 is_forced (what [, i16|i32|u16|u32 sts=NULL [, i32|u32 mask=NULL]])

what

I/O to be controlled. It can be:

Type

Description

inp(nCh)

Where nCh is the input channel. It can be any expression

inp_w(nW)

Where nW is the index of the input word. Can be any expression

inp_w(nW).(iB)

Where nW is the index of the input word and iB is the bit of the input word. It can be any expression

out(nCh)

Where nCh is the output channel. Can be any expression

out_w(nW)

Where nW is the index of the output word. Can be any expression

out_w(nW).(iB)

Where nW is the index of the output word and iB is the bit of the output word. It can be any expression

sts

The function will write to sts the state of forcing of the word bits:

the X bit of sts is 0 if the X bit of the word is forced to FALSE or unforced

the X bit of sts is 1 if the X bit of the word is forced to TRUE

NOTE: Using sts as i32 for a word that is considered i16, sign extension will be done on the 32 bits.

(optional, default NULL)

mask

The function will write the mask of the forced word bits into mask:

the X bit of mask is 0 if the X bit of the word is not forced

the X bit of mask is 1 if the X bit of the word is forced (either to TRUE or FALSE).

Must be u32 if sts is i32 or u32, or u16 if sts is i16 or u16.

(optional, default NULL)

Result

Returns:

Value

Description

1

Forced entity

0

Unforced entity

-1

RTE version not compatible

-2

Invalid index

-3

Invalid bit

Validity

Rule, Task

Note

It should be remembered that:

forcing an input means that sw will see the state of the forced input, regardless of the actual state of the physical input

forcing an output means that the physical output will take the forced value regardless of the desired value imposed by sw

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC