<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to SysCom Library Usage</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ea4316ed77/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ea4316ed77/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/ea4316ed77/</id><updated>2024-08-10T08:57:27.236000Z</updated><subtitle>Recent posts to SysCom Library Usage</subtitle><entry><title>SysCom Library Usage</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ea4316ed77/?limit=25#cefc" rel="alternate"/><published>2024-08-10T08:57:27.236000Z</published><updated>2024-08-10T08:57:27.236000Z</updated><author><name>abrarsk</name><uri>https://forge.codesys.com/u/abrarsk/</uri></author><id>https://forge.codesys.com393ed43a741e23eca99085ffb093ac0d70fe07d5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Update:&lt;/p&gt;
&lt;p&gt;I was able to successfully use the SysCom.lib. I had to install SysTypes2Interface library as well and wrote following code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Declaration&lt;/strong&gt;&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="n"&gt;hCom&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;RTS_IEC_HANDLE&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;
&lt;span class="n"&gt;pResult&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;POINTER&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;TO&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="n"&gt;RTS_IEC_RESULT&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Implementation&lt;/strong&gt;&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;hCom&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;SysComOpen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;ComSettings&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nv"&gt;sPort&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;ADR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;pResult&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;</summary></entry><entry><title>SysCom Library Usage</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ea4316ed77/?limit=25#4cdd" rel="alternate"/><published>2024-08-05T08:20:16.079000Z</published><updated>2024-08-05T08:20:16.079000Z</updated><author><name>abrarsk</name><uri>https://forge.codesys.com/u/abrarsk/</uri></author><id>https://forge.codesys.com70f57e9783351555a4114e7acaf425a041852464</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Link to library: &lt;a href="https://content.helpme-codesys.com/en/libs/SysCom/Current/index.html" rel="nofollow"&gt;https://content.helpme-codesys.com/en/libs/SysCom/Current/index.html&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>SysCom Library Usage</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/ea4316ed77/?limit=25#2625" rel="alternate"/><published>2024-08-05T08:15:32.517000Z</published><updated>2024-08-05T08:15:32.517000Z</updated><author><name>abrarsk</name><uri>https://forge.codesys.com/u/abrarsk/</uri></author><id>https://forge.codesys.com9a371c1b066858824ae7e8b49e3c6852ccf7ce78</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello all, &lt;/p&gt;
&lt;p&gt;I am facing issues with using SysCom library. With SysCom23 library things were simple but since we are migrating to 64bit systems, I am writing a Porting program. &lt;/p&gt;
&lt;p&gt;With SysCom23, opening the comport was as simple as providing the ComPort no. which returns the Handle as a DWORD.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nt"&gt;dwHandle&lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="nt"&gt;SysComOpen&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;Port&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;But the new library is a bit different. It is asking for 2 input parameters to open the Com Port - Port Number and POINTER to RTS_IEC_RESULT&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;IF&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;hCom&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nv"&gt;THEN&lt;/span&gt;
&lt;span class="w"&gt;                &lt;/span&gt;&lt;span class="nv"&gt;hCom&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;:=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;SysComOpen&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;ComSettings&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nv"&gt;sPort&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nf"&gt;ADR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;pResult&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;How should I use the RTS_IEC_Result? I can find RTS_IEC-REUSLT under SysType2Interfaces of SysCom library.&lt;/p&gt;
&lt;p&gt;Also, can someone give me a general understanding of this RTS_IEC_REULT and RTS_IEC_HANDLE, etc.?&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>