<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to C code in Codesys</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/33022bd8ee/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/33022bd8ee/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/33022bd8ee/</id><updated>2021-11-30T19:52:24.904000Z</updated><subtitle>Recent posts to C code in Codesys</subtitle><entry><title>C code in Codesys</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/33022bd8ee/?limit=25#d5a3" rel="alternate"/><published>2021-11-30T19:52:24.904000Z</published><updated>2021-11-30T19:52:24.904000Z</updated><author><name>s45er</name><uri>https://forge.codesys.com/u/s45er/</uri></author><id>https://forge.codesys.coma18f2c03942fca020c3f1f4f42df791eb1cbb86a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hello, trying to integrate the C code in Automation Builder. The purpose of this code is to convert base64 encoded message. The C function will be called in CoDeSyS.&lt;/p&gt;
&lt;p&gt;&lt;img src="./attachment/base64_decode.jpg" width="50%"/&gt;&lt;/p&gt;
&lt;p&gt;The base64 converter code works successfully in MPLAB (running on PIC32)&lt;/p&gt;
&lt;p&gt;&lt;img src="./attachment/call_of_base64_decode.jpg" width="50%"/&gt;&lt;/p&gt;
&lt;p&gt;However when I try to integrate it, I cant do it, since in available data types I cant choose array of uint, only data types without array. The picture shows the dialogue of C code app in Automation Builder (CoDeSys data types).&lt;/p&gt;
&lt;p&gt;&lt;img src="./attachment/C_code_ab.jpg" width="50%"/&gt;&lt;/p&gt;
&lt;p&gt;I had a thought maybe I can use a STRING, as array of UINT, in CoDeSys by applying pointers, but not sure.&lt;br/&gt;
May be some has encountered the same problem ? Or knows possible solution ?&lt;/p&gt;
&lt;p&gt;I apologize for offtopic, but dont know where to ask, thought CoDeSys forum best place, since Automation Builder refers to CoDeSys data types.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>