Skip to content

Commit 429a528

Browse files
Merge pull request #35 from Inxton/5-_BUG_Incorrect_Data_Type_Definition_in_GetResultAsString_Method_of_TcoDataman_v_5_x_x_in_TcoCognexVision
[BUG] Incorrect Data Type Definition in GetResultAsString Method of TcoDataman_v_5_x_x in TcoCognexVision
2 parents e3ae0c3 + 08886bc commit 429a528

44 files changed

Lines changed: 4017 additions & 652 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/TcoCognexVision/src/TcoCognexVisionConnector/Properties/Localizations.Designer.cs

Lines changed: 99 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/TcoCognexVision/src/TcoCognexVisionConnector/Properties/Localizations.resx

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,9 @@ IF Execute() THEN
255255
<data name="___Error_time_is_lower_than_timeout__Please_check_config___" xml:space="preserve">
256256
<value>Error time is lower than timeout. Please check config!</value>
257257
</data>
258+
<data name="___Waiting_for_the_Online_signal___" xml:space="preserve">
259+
<value>Waiting for the Online signal!</value>
260+
</data>
258261
<data name="___Trigger___" xml:space="preserve">
259262
<value>Trigger!</value>
260263
</data>
@@ -273,9 +276,6 @@ IF Execute() THEN
273276
<data name="___Reset_Request___" xml:space="preserve">
274277
<value>Reset Request!</value>
275278
</data>
276-
<data name="___Waiting_for_the_Online_signal___" xml:space="preserve">
277-
<value>Waiting for the Online signal!</value>
278-
</data>
279279
<data name="___Waiting_to_Acknowledge_results___" xml:space="preserve">
280280
<value>Waiting to Acknowledge results!</value>
281281
</data>
@@ -315,6 +315,33 @@ IF Execute() THEN
315315
<data name="___Trigger_with_Timeout__" xml:space="preserve">
316316
<value>Trigger with Timeout</value>
317317
</data>
318+
<data name="___Set_user_data_running___" xml:space="preserve">
319+
<value>Set user data running.</value>
320+
</data>
321+
<data name="___Waiting_for_the_User_data_to_be_copied___" xml:space="preserve">
322+
<value>Waiting for the User data to be copied!</value>
323+
</data>
324+
<data name="___Waiting_for_signal_User_dataset_acknowledge__" xml:space="preserve">
325+
<value>Waiting for signal User dataset acknowledge</value>
326+
</data>
327+
<data name="___Set_user_data_was_aborted__while_not_yet_finished___" xml:space="preserve">
328+
<value>Set user data was aborted, while not yet finished.</value>
329+
</data>
330+
<data name="___Set_User_data_of_the_inspection__was_completed_succesfully___" xml:space="preserve">
331+
<value>Set User data of the inspection was completed succesfully.</value>
332+
</data>
333+
<data name="___Set_user_data__finished_with_error___" xml:space="preserve">
334+
<value>Set user data finished with error.</value>
335+
</data>
336+
<data name="___Clear_user_data_was_aborted__while_not_yet_finished___" xml:space="preserve">
337+
<value>Clear user data was aborted, while not yet finished.</value>
338+
</data>
339+
<data name="___Userdata_of_the_inspection__was_completed_succesfully___" xml:space="preserve">
340+
<value>Userdata of the inspection was completed succesfully.</value>
341+
</data>
342+
<data name="___User_data__finished_with_error___" xml:space="preserve">
343+
<value>User data finished with error.</value>
344+
</data>
318345
<data name="___Trigger_running___" xml:space="preserve">
319346
<value>Trigger running.</value>
320347
</data>
@@ -462,6 +489,12 @@ IF Execute() THEN
462489
<data name="___Clear_inspection_results__" xml:space="preserve">
463490
<value>Clear inspection results</value>
464491
</data>
492+
<data name="___Set_user_data__" xml:space="preserve">
493+
<value>Set user data</value>
494+
</data>
495+
<data name="___Clear_user_data__" xml:space="preserve">
496+
<value>Clear user data</value>
497+
</data>
465498
<data name="___Soft_event__" xml:space="preserve">
466499
<value>Soft event</value>
467500
</data>
@@ -498,6 +531,9 @@ IF Execute() THEN
498531
<data name="___Index_of_UserData_in_method_SetUserDataAsString_exceeds_the_defined_size__" xml:space="preserve">
499532
<value>Index of UserData in method SetUserDataAsString exceeds the defined size</value>
500533
</data>
534+
<data name="___Continuous_Reading__Hand_held_reader___" xml:space="preserve">
535+
<value>Continuous Reading (Hand-held reader)</value>
536+
</data>
501537
<data name="___Trigger_enable__" xml:space="preserve">
502538
<value>Trigger enable</value>
503539
</data>

src/TcoCognexVision/src/XAE/XAE/TcoCognexVision/POUs/TcoDataman/v_5_x_x/Structs/TcoDatamanConfig_v_5_x_x.TcDUT

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
ResultDataSize : eDatamanResultDataSize_v_5_x_x := eDatamanResultDataSize_v_5_x_x.RESULT_DATA_64B;
88
UserDataSize : eDatamanUserDataSize_v_5_x_x := eDatamanUserDataSize_v_5_x_x.USER_DATA_64B;
99
DataFormat : eTcoDataFormat := TcoUtilities.eTcoDataFormat.BigEndian;
10+
{attribute addProperty Name "<#Continuous Reading (Hand-held reader)#>"}
1011
ContinuousReading : BOOL := FALSE;
11-
UpdateStatesPermanently : BOOL := FALSE;
12+
UpdateStatesPermanently : BOOL := TRUE;
1213
InfoTime : TIME := T#2S;
1314
ErrorTime : TIME := T#5S;
1415
ShowUserData : BOOL := FALSE;
1516
ShowResultsData : BOOL := FALSE;
16-
1717
END_STRUCT
1818
END_TYPE
1919
]]></Declaration>

src/TcoCognexVision/src/XAE/XAE/TcoCognexVision/POUs/TcoDataman/v_5_x_x/Structs/TcoDatamanStatus_v_5_x_x.TcDUT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<Declaration><![CDATA[TYPE TcoDatamanStatus_v_5_x_x :
55
STRUCT
66
ActionDescription : STRING(100);
7-
ResultString:STRING;
7+
ResultString:STRING(254);
88
99
SignalStatus : TcoDatamanSignalStates_v_5_x_x;
1010
END_STRUCT

src/TcoCognexVision/src/XAE/XAE/TcoCognexVision/POUs/TcoDataman/v_5_x_x/TcoDataman_v_5_x_x.TcPOU

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ GetResultAsReal := TcoUtilities.TcoBytesToReal(THIS^._config.DataFormat, THIS^._
281281
</Implementation>
282282
</Method>
283283
<Method Name="GetResultAsString" Id="{47535512-60fe-0a1f-1f20-295ecdd0fd48}" FolderPath="ResultData\">
284-
<Declaration><![CDATA[METHOD GetResultAsString : STRING
284+
<Declaration><![CDATA[METHOD GetResultAsString : STRING(254)
285285
VAR_INPUT
286286
inPosition : UINT;
287287
inLength : UINT;

src/TcoCore/README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,65 @@
44

55
## Components
66

7+
### Generic Component rendering
8+
9+
![alt text](assets/image-1.png)
10+
The default display of a generic component is in an expander.
11+
In the expander header, the most important status information is shown (see figure above), which provides a quick overview of the current device state – for example, basic status, error messages, or connection information.
12+
13+
When the expander is expanded, more complex information is displayed, divided into several sections:
14+
- Top section: always contains a list of tasks available for the component. These tasks represent specific functions or operations – e.g., movement, reset, diagnostics, test modes, etc.
15+
- Left section: displays the component’s status – such as current operating state, errors, warnings, or basic values (position, power status, etc.).
16+
- Config section: contains configuration data of the component – parameters such as identifiers, device types, communication settings, and other technical data.
17+
- Control section (if available): enables manual control of selected component functions (e.g., start, reset, output activation, etc.).
18+
19+
This structure allows quick orientation while also providing detailed access to information and control without the need to switch between multiple screens.
20+
21+
```pascal
22+
{attribute 'qualified_only'}
23+
TYPE GenericComponent EXTENDS TcoCore.TcoComponent
24+
VAR
25+
{attribute addProperty Name "<#Config#>"}
26+
_config : SomeTcoGenericComponent_Config;
27+
28+
{attribute addProperty Name "<#Status#>"}
29+
_status : SomeTcoGenericComponent_Status;
30+
31+
{attribute addProperty Name "<#Control#>"}
32+
_control : SomeTcoGenericComponent_Control;
33+
END_VAR
34+
END_TYPE
35+
```
36+
37+
### Generic rendering of a Wrapped Component
38+
A wrapped component has the same basic structure as a generic component – consisting of a header in an expander, a basic overview of states, and an expanded part with sections like Status, Config, Control (if available), and the task list in the top part.
39+
40+
The difference is that a wrapped component groups and displays already existing generic components that are part of it internally. These are visually embedded (wrapped) into a single unit and serve as subcomponents.
41+
42+
![alt text](assets/image-2.png)
43+
Properties of a wrapped component:
44+
45+
- Displays internal generic components, which themselves already represent functional modules (e.g., xis, camera, sensor...).
46+
- Each of these nested components retains its own functionality and status information.
47+
- A wrapped component thus serves as a higher-level element that enables unified display and control of multiple related components at once – for example, in the case of complex technology consisting of several devices from different manufacturers.
48+
49+
```pascal
50+
TYPE WrappedComponent EXTENDS TcoCore.TcoComponent
51+
VAR
52+
{attribute addProperty Name "<#Config#>"}
53+
_config : SomeTcoGenericComponent_Config;
54+
55+
{attribute addProperty Name "<#Status#>"}
56+
_status : SomeTcoGenericComponent_Status;
57+
58+
{attribute addProperty Name "<#Control#>"}
59+
_control : SomeTcoGenericComponent_Control;
60+
61+
{attribute addProperty Name "<#Components#>"}
62+
_components : SomeTcoGenericComponent_Components := (Parent := THIS^);
63+
END_VAR
64+
END_TYPE
65+
```
766

867
## Dialogs
968

src/TcoCore/assets/image-1.png

72.4 KB
Loading

src/TcoCore/assets/image-2.png

51.8 KB
Loading

0 commit comments

Comments
 (0)