Type: |
Program |
Available as of: |
V1.0.0.0 |
Inherits from: |
- |
Implements: |
- |
This chapter provides information on:
SR_<Camera Name> provides a vision server to receive data from a camera.
If a camera is connected to this server (q_xClientConnected = TRUE), SR_<Camera Name> can receive data.
SR_<Camera Name>.xVisionDataReceived signals that data has been received. The data can be read with the methods GetHeader, GetProducts, and GetAdditionalString.
If data is already received, the method ClearVisionData must be called before new data can be received.
Input |
Data type |
Description |
---|---|---|
i_xEnable |
BOOL |
A rising edge FALSE -> TRUE activates the POU, a falling edge TRUE -> FALSE deactivates the POU. A deactivated POU does not execute any action. |
i_xDiagQuit |
BOOL |
A rising edge FALSE -> TRUE cancels an active exception of the POU. |
Output |
Data type |
Description |
---|---|---|
q_xActive |
BOOL |
TRUE: The POU is active. If the output is TRUE while the i_xEnable is deactivated, the POU must first terminate its ongoing processing before transitioning this output to FALSE. FALSE: The POU is inactive |
q_xReady |
BOOL |
TRUE: The POU is ready to operate and can accept user commands. FALSE: The function block is not ready to accept user commands. |
q_etDiag |
General library-independent statement on the diagnostic. A value unequal to GD.ET_Diag.Ok corresponds to a diagnostic message. |
|
q_etDiagExt |
POU-specific output on the diagnostic. q_etDiag = GD.ET_Diag.Ok -> Status message q_etDiag <> GD.ET_Diag.Ok -> Diagnostic message |
|
q_sMsg |
STRING[80] |
Event-triggered message that gives more detailed information on the diagnostic state. |
q_xClientConnected (q_xConnectedToServer) |
BOOL |
In case the controller is TCP-Server: Indicates if there is a connected client. (Or, in case the controller is TCP-Client: Indicates if the connection to a TCP-Server is established.) |
q_etDiag |
q_etDiagExt |
Enumeration value of q_etDiagExt |
Plain text |
---|---|---|---|
Ok |
Ok |
0 |
Ok. |
Working |
8 |
Working. |
|
WaitUntilDisabled |
10 |
Disabling. |
|
Disabled |
11 |
Disabled. |
|
ConfigurationFailed |
ConfigurationInvalid |
16 |
Configuration invalid. |
UnexpectedProgramBehavior |
UnexpectedFeedback |
4 |
Internal error detected. |
ExecutionAborted |
ProtocolHeaderInvalid |
5 |
The header of protocol is invalid. |
StartOfProductDataInvalid |
6 |
The start of the product data is invalid. |
|
AnotherProtocolAlreadyExecuting |
20 |
Another protocol is already executing. |
|
VisionDataHasNotBeenCleared |
24 |
Vision data has not been cleared. |
|
EndSignalOfDataInvalid |
21 |
End signal of data invalid. |
|
AddressInUse |
18 |
Address is in use. |
|
CertificateNotFound |
72 |
The certificate used is not found. |
|
CertificateFailureServer |
73 |
The certificate used is not valid (TlsError). |
|
CertificateFailureClient |
74 |
The certificate used is not valid (TlsError). |
|
InitTlsContextFailed |
75 |
Excessive number of sockets used, only 10 sockets are available. |
|
CertificateNoKey |
76 |
No private key is available. |
|
LimitReached |
AdditionalStringLengthExceeded |
33 |
Length of the additional string was exceeded. |
ProductsPerProtocolExceeded |
19 |
Number of products per protocol was exceeded. |
|
ProtocolLengthExceeded |
15 |
Protocol length has been exceeded. |
|
UserDataLengthExceeded |
32 |
Length of the user data was exceeded. |
|
InputParameterInvalid |
InputStringInvalid |
77 |
The received string is invalid. |
Enumeration name: |
AdditionalStringLengthExceeded |
Enumeration value: |
33 |
Description: |
Additional string length exceeded. |
Issue |
Cause |
Solution |
---|---|---|
Length of the additional string was exceeded. |
The length of the additional string exceeds the maximum length of 80 characters. |
Adapt the length of the additional string. |
Enumeration name: |
AddressInUse |
Enumeration value: |
18 |
Description: |
Duplicate address. |
Issue |
Cause |
Solution |
---|---|---|
The address/port is already used. |
The IP address / port combination is not unique. |
Verify that the combination of IP address and port is unique and not used by another client. |
Enumeration name: |
AnotherProtocolAlreadyExecuting |
Enumeration value: |
20 |
Description: |
Another protocol is already executing. |
Issue |
Cause |
Solution |
---|---|---|
Another protocol is already executing. |
A protocol is not completely analyzed while a new protocol is sent. |
Verify that no new protocol is triggered before the current protocol is completely analyzed. |
Enumeration name: |
CertificateNotFound |
Enumeration value: |
72 |
Description: |
The certificate used is not found. |
Issue |
Cause |
Solution |
---|---|---|
The certificate used is not found on the controller. |
Incorrect name for certificate selected. |
Verify that the name selected for Certificate Name is correct. |
Enumeration name: |
CertificateFailureServer |
Enumeration value: |
73 |
Description: |
The certificate used is not valid (TlsError). |
Issue |
Cause |
Solution |
---|---|---|
The certificate used is not valid. |
Certificate is not stored in Trusted Certificate. |
Move the certificate from Quarantined Certificate to Trusted Certificate and reboot the controller. Further information can be found under Menu Commands Online Help > View Menu Commands > Security Screen |
Enumeration name: |
CertificateFailureClient |
Enumeration value: |
74 |
Description: |
The certificate used is not valid (TlsError). |
Issue |
Cause |
Solution |
---|---|---|
The certificate used is not valid. |
Certificate is not stored in Trusted Certificate. |
Move the certificate from Quarantined Certificate to Trusted Certificate and reboot the controller. Further information can be found under Menu Commands Online Help > View Menu Commands > Security Screen |
Enumeration name: |
CertificateNoKey |
Enumeration value: |
76 |
Description: |
No private key is available. |
Issue |
Cause |
Solution |
---|---|---|
No private key is available. |
The certificate used has no private key. |
Use a certificate with a private key or use the default certificate. |
Enumeration name: |
ConfigurationInvalid |
Enumeration value: |
16 |
Description: |
The configuration is invalid. |
Issue |
Cause |
Solution |
---|---|---|
The configuration is invalid. |
The configuration values set in are invalid. |
Verify that valid values have been set in Basic Configurations. |
Enumeration name: |
Disabled |
Enumeration value: |
11 |
Description: |
Disabled. |
Issue |
Cause |
Solution |
---|---|---|
The function block is deactivated, no actions are executed. |
SR_<CameraName>.xEnable and SR_<CameraName>.xActive are set to FALSE. |
Set SR_<CameraName>.xEnable to TRUE. |
Enumeration name: |
EndSignalOfDataInvalid |
Enumeration value: |
21 |
Description: |
End signal of data invalid. |
Issue |
Cause |
Solution |
---|---|---|
End signal of data is invalid |
The end signal (CarriageReturn) of the vision data was not detected. |
Verify that the data is terminated with a last signal CarriageReturn. |
Enumeration name: |
InitTlsContextFailed |
Enumeration value: |
75 |
Description: |
Too much sockets used, only 10 sockets are available. |
Issue |
Cause |
Solution |
---|---|---|
Too much sockets used, only 10 sockets are available. |
Too much sockets for TCP-Connection are open. |
Verify that not more than 10 sockets are used. (The 10 sockets are valid for the complete controller. If other connections are used, verify that these connections are closed correctly). |
Enumeration name: |
InputStringInvalid |
Enumeration value: |
77 |
Description: |
The received string is invalid. |
Issue |
Cause |
Solution |
---|---|---|
The received string is invalid. |
The received string is not correct. |
Verify to send a correct protocol string. |
Enumeration name: |
Ok |
Enumeration value: |
0 |
Description: |
Ok |
Status message: Reading the data was successful.
Enumeration name: |
ProductsPerProtocolExceeded |
Enumeration value: |
19 |
Description: |
Maximum number of products per protocol exceeded. |
Issue |
Cause |
Solution |
---|---|---|
Number of products per protocol is exceeded. |
The number of products in one vision protocol exceeds the maximum number (Gc_uiMaxNumberOfProductsPerProtocol). |
Adapt the parameter Gc_uiMaxNumberOfProductsPerProtocol. Send the product data in several protocols. |
Refer to GPL.
Enumeration name: |
ProtocolHeaderInvalid |
Enumeration value: |
5 |
Description: |
The header of the protocol is invalid. |
Issue |
Cause |
Solution |
---|---|---|
The header of the protocol is invalid. |
The protocol length in the header is 0 (uiProtocolLength). |
Verify that the header provides the correct length of the protocol. |
Header of the protocol does not contain the string Vision (sHeaderId). |
Verify that the protocol starts with the string Vision. |
|
Header contains invalid letters after the string Vision. |
Verify that the header only contains the string Vision followed by 16 numbers. |
|
Another client sends data. |
Verify that the combination of IP address and port is unique and not used by another client. |
Refer to ST_VisionDataHeader.
Enumeration name: |
ProtocolLengthExceeded |
Enumeration value: |
15 |
Description: |
The length of the protocol has been exceeded. |
Issue |
Cause |
Solution |
---|---|---|
Protocol length is exceeded. |
The length of the vision protocol exceeds the maximum length (Gc_uiMaxLengthProtocol). |
Adapt the parameter Gc_uiMaxLengthProtocol. Send the product data in several protocols. |
Refer to GPL.
Enumeration name: |
StartOfProductDataInvalid |
Enumeration value: |
6 |
Description: |
The start of a product data is invalid. |
Issue |
Cause |
Solution |
---|---|---|
The start of a product data is invalid. |
Product data does not start with object index O. |
Verify that the product data start with O (for example, O1I1X10…). |
First letters after the header must be P, A, or CarriageReturn. |
Verify that the product data after the header starts with P, A, or CarriageReturn. |
Enumeration name: |
UnexpectedFeedback |
Enumeration value: |
4 |
Description: |
Internal error detected. |
Issue |
Cause |
Solution |
---|---|---|
Feedback was invalid. |
Receiving data was not successful, the server was shut down. |
Restart the server. |
Enumeration name: |
UserDataLengthExceeded |
Enumeration value: |
32 |
Description: |
User data length exceeded. |
Issue |
Cause |
Solution |
---|---|---|
User data length is exceeded. |
The length of the user data exceeds the maximum length of 80. |
Adapt the length of the user data. |
Enumeration name: |
VisionDataHasNotBeenCleared |
Enumeration value: |
24 |
Description: |
Vision data has not been cleared. |
Issue |
Cause |
Solution |
---|---|---|
Vision data was not cleared. |
Vision data was not been cleared before new data has been received. |
Verify that method ClearVisionData was called before receiving new data. |
Enumeration name: |
WaitUntilDisabled |
Enumeration value: |
10 |
Description: |
Wait until disabled. |
Status message: The function block is going to be disabled.
Enumeration name: |
Working |
Enumeration value: |
8 |
Description: |
Working. |
Status message: The data is being read.
Name |
Description |
---|---|
ClearVisionData |
Clear vision data and prepare the function block to receive new data. |
Configuration |
Called only once before the initialization step of the module is executed. |
GetAdditionalString |
Read out the additional string of the vision protocol. |
GetHeader |
Read out the header data of the vision protocol. |
GetProducts |
Read out the product data of the vision protocol. |
Logic |
Program any kind of logic for the camera. |
RegisterLoggerPoint |
Register the function block FB_ReceiveVisionData to the . |
Trigger |
Add code to trigger a signal. |
Name |
Data type |
Accessing |
Description |
---|---|---|---|
xBlockGenerateTargets |
BOOL |
Read/Write |
Read/Write : The targets generation is executed. TRUE: The generation of targets is blocked. Receiving targets data is still active. The property can be used to switch between the generation of targets and receiving data of detected targets for example by some vision systems. |
xVisionDataReceived |
BOOL |
Read |
Signal that new vision data has been received and can be read out. |
xTrigger |
BOOL |
Read/Write |
Calls the method Trigger and triggers the target generation, if active. |