<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Read codesys version in the codesys application</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/635e1260d0/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/Engineering/thread/635e1260d0/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/Engineering/thread/635e1260d0/</id><updated>2025-01-20T09:52:39.756000Z</updated><subtitle>Recent posts to Read codesys version in the codesys application</subtitle><entry><title>Read codesys version in the codesys application</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/635e1260d0/?limit=25#563a" rel="alternate"/><published>2025-01-20T09:52:39.756000Z</published><updated>2025-01-20T09:52:39.756000Z</updated><author><name>sigurdrb</name><uri>https://forge.codesys.com/u/sigurdrb/</uri></author><id>https://forge.codesys.com368bce890b163becf0eec746f4d97c9e79268aa0</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Thanks for your answers! Both ways worked as intented. Really appreciate it :) &lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Read codesys version in the codesys application</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/635e1260d0/?limit=25#1434" rel="alternate"/><published>2025-01-17T15:40:36.069000Z</published><updated>2025-01-17T15:40:36.069000Z</updated><author><name>gatto</name><uri>https://forge.codesys.com/u/gatto/</uri></author><id>https://forge.codesys.combcaca4f956f8910c5166f0e54d32698a88ed562c</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;hi, i used another way&lt;/p&gt;
&lt;p&gt;declaration:&lt;br/&gt;
    pApp : POINTER TO APPLICATION;&lt;br/&gt;
    pAppInfo : POINTER TO APPLICATION_INFO;&lt;br/&gt;
    ProjectName  : STRING (24) ;&lt;br/&gt;
    CodesysVersion  : STRING (15) ;&lt;/p&gt;
&lt;p&gt;code:&lt;br/&gt;
//library :&lt;br/&gt;
// CmpApp&lt;br/&gt;
// IoDrvEthernet&lt;br/&gt;
//&lt;br/&gt;
// Get Pointer to current application&lt;br/&gt;
pApp := CmpApp.AppGetCurrent( pResult:= 0 );&lt;br/&gt;
// Get Pointer to Application information&lt;br/&gt;
pAppInfo := CmpApp.AppGetApplicationInfo(pApp:= pApp, pResult:= 0 );&lt;br/&gt;
ProjectName := pAppInfo^.pstProjectName^ ;&lt;br/&gt;
//convert codesys version to string&lt;br/&gt;
CodesysVersion := IoDrvEthernet.UDINT_TO_IPSTRING ( udiIPAddress :=  pApp^.udiPSVersion ) ;&lt;/p&gt;
&lt;hr/&gt;
&lt;p&gt;so i think you need to convert your dwVersion in a UDINT and after convert UDINT_TO_IPSTRING&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Read codesys version in the codesys application</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/635e1260d0/?limit=25#89ea" rel="alternate"/><published>2025-01-17T15:35:39.182000Z</published><updated>2025-01-17T15:35:39.182000Z</updated><author><name>TimvH</name><uri>https://forge.codesys.com/u/timvh/</uri></author><id>https://forge.codesys.com18a7bb8c3feb214e0c69b7975fa26310170869a3</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;VAR&lt;br/&gt;
    RuntimeVersion: VERSION;&lt;br/&gt;
END_VAR&lt;/p&gt;
&lt;p&gt;RuntimeVersion := __SYSTEM.Constants.RuntimeVersion;&lt;/p&gt;
&lt;p&gt;PS, when I call the SysTargetGetVersion on a Control Win, I get the value 50664488 = 16#03051428&lt;br/&gt;
equals version 3.5.20.40&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Read codesys version in the codesys application</title><link href="https://forge.codesys.com/forge/talk/Engineering/thread/635e1260d0/?limit=25#55a2" rel="alternate"/><published>2025-01-17T13:39:56.379000Z</published><updated>2025-01-17T13:39:56.379000Z</updated><author><name>sigurdrb</name><uri>https://forge.codesys.com/u/sigurdrb/</uri></author><id>https://forge.codesys.comdfce1feb6a83bc6f8dfba8f33f4a162800b73aa5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Hi! I want to read the codesys version into the project, so I can highlight it in the SCADA system.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="kr"&gt;VAR&lt;/span&gt;
    &lt;span class="n"&gt;dwVersion&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;DWORD&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;END_VAR&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="nv"&gt;SysTarget&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;SysTargetGetVersion&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;pulVersion&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;ADR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;dwVersion&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;This gives me the value 100859909.&lt;/p&gt;
&lt;p&gt;I tried to search ths up and found som older post (https://forge.codesys.com/forge/talk/Runtime/thread/a55981ff4d/) that said each 4 bytes reads a number in the version. &lt;br/&gt;
Example is 50662666 = 16#03050D0A which reads to V3.5.13.10&lt;/p&gt;
&lt;p&gt;When I run this code I get the value 100859909, which I cant translate to anything meaningful.&lt;/p&gt;
&lt;p&gt;I am running it on Codesys V3.5.19.70.&lt;/p&gt;
&lt;p&gt;Help appreciated!&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>