Skip to content

Commit

Permalink
1.3.7.15 Update
Browse files Browse the repository at this point in the history
  • Loading branch information
fisothemes committed Dec 9, 2024
1 parent 551ee5a commit eb13aec
Show file tree
Hide file tree
Showing 14 changed files with 52 additions and 30 deletions.
35 changes: 21 additions & 14 deletions LabVIEW TwinCAT ADS.vipb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<VI_Package_Builder_Settings Version="2020.1" Created_Date="2023-03-09 15:29:15" Modified_Date="2024-11-18 01:58:34" Creator="MzumaG01" Comments="" ID="b2165a2bcec37eb2b0cdabc815a2b041">
<VI_Package_Builder_Settings Version="2020.1" Created_Date="2023-03-09 15:29:15" Modified_Date="2024-12-09 03:03:54" Creator="MzumaG01" Comments="" ID="0a789c0977a0ee3168b9d1eff4298dde">
<Library_General_Settings>
<Package_File_Name>FisoThemes_lib_LabVIEW_TwinCAT_ADS</Package_File_Name>
<Library_Version>1.2.6.15</Library_Version>
<Library_Version>1.3.7.16</Library_Version>
<Auto_Increment_Version>false</Auto_Increment_Version>
<Library_Source_Folder>src</Library_Source_Folder>
<Library_Output_Folder>builds</Library_Output_Folder>
Expand Down Expand Up @@ -71,9 +71,16 @@ Please feel free to contact me if you have questions, issues, or suggestions.
<Copyright/>
<Packager>Goodwill Mzumala</Packager>
<URL>https://github.com/fisothemes/LabVIEW-TwinCAT-ADS</URL>
<Release_Notes>&lt;b&gt;&lt;u&gt;Fixes:&lt;/u&gt;&lt;/b&gt;
- Failure to connect to free task ports (300-399) on the PLC.
- Error in `Read Method Information.vi` on `TwinCAT 3.1.4024.6`.</Release_Notes>
<Release_Notes>
&lt;b&gt;&lt;u&gt;New Features:&lt;/u&gt;&lt;/b&gt;
- Added support for free tasks (ports 300-399) on the PLC.

&lt;b&gt;&lt;u&gt;Improvements:&lt;/u&gt;&lt;/b&gt;
- Significant improvements in read/write/invoke speeds for large structs and arrays.
- Added support for invoking RPC methods with `VAR_IN_OUT` parameters.

&lt;b&gt;&lt;u&gt;Fixes:&lt;/u&gt;&lt;/b&gt;
- Error in `Read Method Information.vi` on `TwinCAT 3.1.4024.60`.</Release_Notes>
</Description>
<Destinations>
<Toolkit_VIs>
Expand Down Expand Up @@ -630,7 +637,7 @@ Please feel free to contact me if you have questions, issues, or suggestions.
<Path>src\TwinCAT ADS Class\VIs\Events\Add Symbol Notification.vi</Path>
<VI_Title/>
</Items_Data>
<GUID>0E31BF23A5AF1B5825BA72EF419CC3FD</GUID>
<GUID>D346FA1CA5CF975EA9C2D76A9FD68FD5</GUID>
</Functions_Palette_Data>
<Functions_Palette_Data>
<Parent_Palette_Index>0</Parent_Palette_Index>
Expand Down Expand Up @@ -791,7 +798,7 @@ Please feel free to contact me if you have questions, issues, or suggestions.
<Path>src\TwinCAT ADS Class\VIs\Advanced\DATE-DT Byte Stream to Timestamp.vi</Path>
<VI_Title/>
</Items_Data>
<GUID>37F49DD327CB57549A24F05BA101D4F1</GUID>
<GUID>2A76A1F03B2AAECA2DC2EE89C461E635</GUID>
</Functions_Palette_Data>
<Functions_Palette_Data>
<Parent_Palette_Index>0</Parent_Palette_Index>
Expand Down Expand Up @@ -826,7 +833,7 @@ Please feel free to contact me if you have questions, issues, or suggestions.
<Path>src\TwinCAT ADS Class\VIs\Configuration\Write ADS State.vi</Path>
<VI_Title/>
</Items_Data>
<GUID>702EC0249379FAD28BA67BCF5D5358A9</GUID>
<GUID>5C99FF7BEA09024CC3FEAAB3F44EEFD7</GUID>
</Functions_Palette_Data>
<Functions_Palette_Data>
<Parent_Palette_Index>0</Parent_Palette_Index>
Expand Down Expand Up @@ -1071,7 +1078,7 @@ Please feel free to contact me if you have questions, issues, or suggestions.
<Path>src\TwinCAT ADS Class\VIs\Extensions\Delete Notification By Handle.vi</Path>
<VI_Title/>
</Items_Data>
<GUID>BBCA4ECC5A98B3C65E3A2BC3410A9C3C</GUID>
<GUID>1838A6A6B52B0451B5C8020833BE9DA3</GUID>
</Functions_Palette_Data>
<Functions_Palette_Data>
<Parent_Palette_Index>0</Parent_Palette_Index>
Expand Down Expand Up @@ -1316,7 +1323,7 @@ Please feel free to contact me if you have questions, issues, or suggestions.
<Path>src\TwinCAT ADS Class\VIs\Status\Read PLC Type.vi</Path>
<VI_Title/>
</Items_Data>
<GUID>A0E692BE24CD4515C6A030FA7EB0D4C7</GUID>
<GUID>ACF46A250CD2D062C7B86A0D0FDB969B</GUID>
</Functions_Palette_Data>
<Functions_Palette_Data>
<Parent_Palette_Index>0</Parent_Palette_Index>
Expand Down Expand Up @@ -1435,7 +1442,7 @@ Please feel free to contact me if you have questions, issues, or suggestions.
<Path>src\TwinCAT ADS Class\VIs\Utilities\Decompose Variant.vi</Path>
<VI_Title/>
</Items_Data>
<GUID>2564FC630D840C27CEBFE9D63058F0DA</GUID>
<GUID>087E64E01365163F357B141FA8923E12</GUID>
</Functions_Palette_Data>
<Functions_Palette_Data>
<Parent_Palette_Index>0</Parent_Palette_Index>
Expand Down Expand Up @@ -1596,7 +1603,7 @@ Please feel free to contact me if you have questions, issues, or suggestions.
<Path>src\Examples\High Speed Reading.vi</Path>
<VI_Title/>
</Items_Data>
<GUID>C36F8408FFB0DBF0BF193FEA38E4A411</GUID>
<GUID>9057817D5BBDAC334E0E6449C2950D17</GUID>
</Functions_Palette_Data>
<Functions_Palette_Data>
<Parent_Palette_Index>0</Parent_Palette_Index>
Expand Down Expand Up @@ -1673,7 +1680,7 @@ Please feel free to contact me if you have questions, issues, or suggestions.
<Path>src\TwinCAT ADS Class\VIs\Connection\Reconnect.vi</Path>
<VI_Title/>
</Items_Data>
<GUID>F819319C8DBAF21282940FF938444CE8</GUID>
<GUID>4F757BD2DF3B014284CBC8600ABCBDFA</GUID>
</Functions_Palette_Data>
<Functions_Palette_Data>
<Parent_Palette_Index>0</Parent_Palette_Index>
Expand Down Expand Up @@ -1792,7 +1799,7 @@ Please feel free to contact me if you have questions, issues, or suggestions.
<Path>src\TwinCAT ADS Class\VIs\Events\Add Multiple Symbol Notifications.vi</Path>
<VI_Title/>
</Items_Data>
<GUID>3E29FE45A05A4CF2E889CB9D60C12F54</GUID>
<GUID>648CBDFAEE23337A973C7A286077FAB4</GUID>
</Functions_Palette_Data>
</Library_Palette_Definition>
</VI_Package_Builder_Settings>
File renamed without changes.
20 changes: 9 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,17 @@ Easy-to-use Unofficial LabVIEW TwinCAT Toolkit for communicating with Beckhoff P

New Features:
-------------
+ Added `Read PLC Type.vi`
+ Added Alias names to Notifications. This means you can listen for changes to the same symbol at different rates.
+ Added support for free tasks (ports 300-399) on the PLC.


Improvements:
-------------
+ Speed of `Read Multiple.vi` and `Write Multiple.vi`
+ Significant improvements in read/write/invoke speeds for large structs and arrays.
+ Added support for invoking RPC methods with `VAR_IN_OUT` parameters.

Fixes:
------
+ Issue reading/writing values of symbols of pointer types that didn't end with ^(dereference character).
+ Issue reading/writing non-jagged arrays.
+ Issue where writing dates for DT type didn't take into account daylight savings.
+ Issue reading and writing `REFERENCE TO` types greater than 4 or 8 bytes (depending on the bitness of the machine).
+ Error in `Read Method Information.vi` on `TwinCAT 3.1.4024.60`.


# Showcase
Expand Down Expand Up @@ -106,8 +104,8 @@ Read, Write and Invoke Method

3. First calls to an operation (Reading/Writing a symbol or Invoking a Method) will be slow.

Typical first call times for my RYZEN 3600X system with 1 isolated core are ~5ms for `ARRAY[0..999] OF LREAL` and ~40ms for `ARRAY[0..999] OF ST_STRUCT` where `ST_STRUCT` is:
```pascal
Typical first call times for my RYZEN 3600X system with 1 isolated core are ~25ms for `ARRAY[0..999] OF LREAL` and ~30ms for `ARRAY[0..999] OF ST_STRUCT` where `ST_STRUCT` is:
```js
TYPE ST_STRUCT :
STRUCT
bVar : BOOL;
Expand All @@ -116,11 +114,11 @@ Read, Write and Invoke Method
END_STRUCT
END_TYPE
```
Subsequent calls resulted in read/write/method invoking times of 1-2ms for `ARRAY[0..999] OF LREAL` and ~20ms for `ARRAY[0..999] OF ST_STRUCT`. The task cycle time was 1ms.
Subsequent calls resulted in read/write/method invoking times of 1-2ms for `ARRAY[0..999] OF LREAL` and ~5ms for `ARRAY[0..999] OF ST_STRUCT`. The task cycle time was 1ms.

4. When sending numbers, arrays of numbers or structs with numbers, enums, etc. The numbers will be coerced to the type defined in the PLC for that variable/parameter. This is by design. LabVIEW is a graphical language so switching between Single Precision Float and Doubles is an absolute pain.

5. LabVIEW Arrays don't need to be the same size as the PLC arrays to write them. Write what you need, the rest will be filled in with defaults.
5. LabVIEW Arrays don't need to be the same size as the PLC arrays to write them. Write what you need, the rest will be filled in with the 0 byte equivalent.
Events
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<TcPlcObject Version="1.1.0.1">
<DUT Name="ST_STRUCT" Id="{0cb4bfeb-1a42-42f0-a535-45fba0731062}">
<Declaration><![CDATA[TYPE ST_STRUCT :
STRUCT
bVar : BOOL;
dtVar : DT;
fVar : LREAL;
END_STRUCT
END_TYPE
]]></Declaration>
</DUT>
</TcPlcObject>
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ VAR
ardtValues : ARRAY[0..999] OF DT := [1000(DT#2024-12-7-11:45:56)];
arfValues : ARRAY[0..999] OF LREAL := [1000(3.14)];
arsValues : ARRAY[0..999] OF WSTRING := [1000("Hello there!")];
arstStruct : ARRAY[0..999] OF ST_STRUCT := [1000((bVar := TRUE, dtVar := DT#2020-2-7-12:55:01, fVar := 3.14))];
arstValues : ARRAY[0..999] OF ST_Simple := [2((bMember := TRUE, dtMember := DT#2020-2-7-12:55:01, nMember := 448))];
arfbValues : ARRAY[0..999] OF FB_Simple[(TRUE, -87, 'Test simple array.')];
END_VAR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@
<Compile Include="DUTs\Struct\ST_Complex.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="DUTs\Struct\ST_STRUCT.TcDUT">
<SubType>Code</SubType>
</Compile>
<Compile Include="PlcTask.TcTTO">
<SubType>Code</SubType>
</Compile>
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1 +1 @@
;l�̺�xI"�N��
�S�ۥ��3��R?
Binary file not shown.
Binary file not shown.
Binary file modified src/TwinCAT ADS Class/VIs/Benchmark.vi
Binary file not shown.

0 comments on commit eb13aec

Please # to comment.