PLC Task
PLC Task
The PLC Camera Base handles the PLC to Camera interaction. By separating the PLC task and Vision task, the PLC task is allowed to run at a faster clock cycle than the Vision task so that other PLC functions are not affected by the slower processing of images. The PLC task is used to run the vision jobs that are setup in the vision task. It also has access to vision results so that it may be used in a PLC process.
FB_PlcCameraBase
| FUNCTION_BLOCK FB_PlcCameraBase EXTENDS FB_ComponentBase
|
Class Diagram
classDiagram
class FB_PlcCameraBase{
CreateEventsI()
CyclicLogic()
GetResults()
Reset()
RunVision
TriggerImage
VisionAlarms
}
FB_PlcCameraBase--|>FB_ComponentBase
Outputs
Name |
Type |
Description |
RunVision |
BOOL |
This will run the vision to aquiring when high and stop the aquiring when low |
SoftwareTrigger |
BOOL |
This will software trigger the camera to take an image |
Reset |
BOOL |
This is used to reset vision system when under error |
Name |
Type |
Description |
CameraState |
ETcVnCameraState |
This is a status of the camera's state |
ResultsAvailable |
BOOL |
This will let the PLC task know that there are results |
NumberOfResults |
UDINT |
This is the number of elements found in the results |
Results |
ARRAY[1..MAX_RESULTS_BUFFER_BYTES] of BYTE |
The data type that is put into buffer will be decided at application time from the process of analysis. Each side will have to define the structure of results needed for PLC task to function |
VisionError |
BOOL |
This is set when there is an error |
VisionErrorID |
UDINT |
This is the value of the Alarm when one is set |
VisionAlarms |
ARRAY[1..5] of FB_TcAlarm |
Alarm object used with Event Logger |