SEMA
Type | Function block | ||||
Description | The object-oriented SEMA function block is used to control the access to a limited number of resources. The function block handles the logic of a semaphore. It ist used as counting semaphore that allows more than one task to access a resource at the same time. The counter of the semaphore counts how many tasks can access a resource at the same time. The initial value is the initial number of resources that can be accessed by the tasks.
Counting starts at 0. The INT value at the FB input MaximumCount specifies the maximum number of times the resource can be accessed simultaneously (default value is 0). If this value is reached, the semaphore blocks the access to the resource until another task releases the semaphore. For example, a semaphore with a MaximumCount value of two can handle up to three concurrent accesses.The function block provides the following methods and an initial value that are used for interacting with a semaphore:
|
||||
Parameters | MaximumCount
|