<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent posts to Error: Type mismatch at output...</title><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/e1929df886/" rel="alternate"/><link href="https://forge.codesys.com/forge/talk/CODESYS-V2/thread/e1929df886/feed.atom" rel="self"/><id>https://forge.codesys.com/forge/talk/CODESYS-V2/thread/e1929df886/</id><updated>2020-02-27T21:35:03.680000Z</updated><subtitle>Recent posts to Error: Type mismatch at output...</subtitle><entry><title>Error: Type mismatch at output...</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/e1929df886/?limit=25#138f" rel="alternate"/><published>2020-02-27T21:35:03.680000Z</published><updated>2020-02-27T21:35:03.680000Z</updated><author><name>Windows</name><uri>https://forge.codesys.com/u/windows/</uri></author><id>https://forge.codesys.com131a42c8b549519f102709b3a59b8a52f0023275</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;jethridge hat geschrieben:&lt;/strong&gt;&lt;br/&gt;
How do I declare a variable as 'POINTER TO STRING(255)'? I tried that too and still got an error. For example, I declared the variable.&lt;br/&gt;
ToEmailAddress : POINTER TO STRING(255) :=  e &lt;a class="" href="mailto:'myemail@mycompany.com"&gt;'myemail@mycompany.com&lt;/a&gt; e ';&lt;br/&gt;
I know my PLC doesn't support the function block, but that is a socket issue. The errors I'm getting are about mismatched variables and data types. I understand the subject email address has to be 'POINTER TO STRING(255)' but don't know how to declare a variable as that.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Did you notice the example within the online help?&lt;/p&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;p&gt;pt:POINTER TO INT;&lt;br/&gt;
var_int1:INT := 5;&lt;br/&gt;
var_int2:INT;&lt;br/&gt;
pt := ADR(var_int1);&lt;br/&gt;
var_int2:= pt^; (&lt;em&gt; var_int2 is now 5 &lt;/em&gt;)&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Error: Type mismatch at output...</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/e1929df886/?limit=25#4182" rel="alternate"/><published>2020-02-27T21:34:59.564000Z</published><updated>2020-02-27T21:34:59.564000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.comf5f06bf3ebc1e5025181ba1fa5f24fd5492320c9</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;a Pointer must be pointing to a Variable, so not the content but a Var, and obvious this must be same type so both 80 or 255.&lt;br/&gt;
not to a piece of text.&lt;br/&gt;
btw, i never use pointers, as this is not conform the standard. IEC61131&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Error: Type mismatch at output...</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/e1929df886/?limit=25#3090" rel="alternate"/><published>2020-02-27T21:34:58.084000Z</published><updated>2020-02-27T21:34:58.084000Z</updated><author><name>jethridge</name><uri>https://forge.codesys.com/u/jethridge/</uri></author><id>https://forge.codesys.combbdc3ffa781be04d2a8f40ae4d9252954681fce8</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;How do I declare a variable as 'POINTER TO STRING(255)'? I tried that too and still got an error. For example, I declared the variable.&lt;/p&gt;
&lt;p&gt;ToEmailAddress : POINTER TO STRING(255) :=  e &lt;a class="" href="mailto:'myemail@mycompany.com"&gt;'myemail@mycompany.com&lt;/a&gt; e ';&lt;/p&gt;
&lt;p&gt;I know my PLC doesn't support the function block, but that is a socket issue. The errors I'm getting are about mismatched variables and data types. I understand the subject email address has to be 'POINTER TO STRING(255)' but don't know how to declare a variable as that.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Error: Type mismatch at output...</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/e1929df886/?limit=25#f24e" rel="alternate"/><published>2020-02-27T21:34:53.990000Z</published><updated>2020-02-27T21:34:53.990000Z</updated><author><name>shooter</name><uri>https://forge.codesys.com/u/shooter/</uri></author><id>https://forge.codesys.com24af80bf8a658a23e69157b56af5dd8a622750f0</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;the type of the string is wrong, you try a string (80) and should be a pointer to string,&lt;br/&gt;
there are types available in the library, and you have to be sure the types on input and inside FB are the same.&lt;/p&gt;
&lt;p&gt;on some it is the version that gives a problem, so check if the version of the codesys can cope and with the PLC and with the libraries.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Error: Type mismatch at output...</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/e1929df886/?limit=25#f1a1" rel="alternate"/><published>2020-02-27T21:34:52.502000Z</published><updated>2020-02-27T21:34:52.502000Z</updated><author><name>jethridge</name><uri>https://forge.codesys.com/u/jethridge/</uri></author><id>https://forge.codesys.com8174166835b131c5bd2668a45a6a45c75d1c6408</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Was reading on this website &lt;a class="" href="http://www.vaeprosys.cz/dokumentace/ac500/English/CHM-Files/CAA-Merger-7/System-Technology-CPUs/AC500_Ethernet_Protocols_Ports.htm" rel="nofollow"&gt;http://www.vaeprosys.cz/dokumentace/ac500/English/CHM-Files/CAA-Merger-7/System-Technology-CPUs/AC500_Ethernet_Protocols_Ports.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If the errors were caused by something else, besides the CPU not supporting it, I'd appreciate any replies so I could add this to my toolbox.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Error: Type mismatch at output...</title><link href="https://forge.codesys.com/forge/talk/Codesys%2520V2.3/thread/e1929df886/?limit=25#b742" rel="alternate"/><published>2020-02-27T21:34:51.025000Z</published><updated>2020-02-27T21:34:51.025000Z</updated><author><name>jethridge</name><uri>https://forge.codesys.com/u/jethridge/</uri></author><id>https://forge.codesys.comec15afdbe4b593e7f3c5bc2e464e80f88c8c047d</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;I have an ABB PM556 PLC and I'm trying to send an email from it using the function block ETH_SMTP_EMAIL_SEND. I'm having issues declaring the inputs for MAIL_INFO on the FB. The function bock uses data type ETH_EMAIL_DATA_TYPE, so I created a variable and declared it as that type.&lt;/p&gt;
&lt;p&gt;EmailData : ETH_EMAIL_DATA_TYPE;&lt;/p&gt;
&lt;p&gt;Then in the program, I try to write to the subject and body for my EmailData variable.&lt;/p&gt;
&lt;p&gt;EmailData.psTOAddr :=  e &lt;a class="" href="mailto:'myemailaddress@mycompany.com"&gt;'myemailaddress@mycompany.com&lt;/a&gt; e ';&lt;br/&gt;
EmailData.apsBody&lt;span&gt;[0]&lt;/span&gt; := 'test body for email from PLC';&lt;/p&gt;
&lt;p&gt;However, I keep getting the following errors:&lt;/p&gt;
&lt;p&gt;Here are the only two links I've been able to find describing this function block and data type.&lt;br/&gt;
&lt;a class="" href="http://www.vaeprosys.cz/dokumentace/ac500/English/CHM-Files/CAA-Merger-6/The-Ethernet-Library/ETH_SMTP_EMAIL_SEND.htm" rel="nofollow"&gt;http://www.vaeprosys.cz/dokumentace/ac500/English/CHM-Files/CAA-Merger-6/The-Ethernet-Library/ETH_SMTP_EMAIL_SEND.htm&lt;/a&gt;&lt;br/&gt;
&lt;a class="" href="http://www.vaeprosys.cz/dokumentace/ac500/English/CHM-Files/CAA-Merger-6/The-Ethernet-Library/ETH_EMAIL_DATA_TYPE.htm" rel="nofollow"&gt;http://www.vaeprosys.cz/dokumentace/ac500/English/CHM-Files/CAA-Merger-6/The-Ethernet-Library/ETH_EMAIL_DATA_TYPE.htm&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;How can I define values for my EmailData variable? The ETH_EMAIL_DATA_TYPE being defined as pointer to strings is throwing me off.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>