CoDeSys & Wago 750-871 Email

Eager Beaver

Member
Join Date
Aug 2021
Location
Sydney
Posts
10
Hello,

I have recently started learning how to program PLCs using CoDeSys v 2.3 and a Wago 750-871 controller.

Thanks to a couple of forum users, I was able to get over a stumbling block last week with another issue, however, I have run into a new challenge today.

I would like to set up a simple function to send a test email and used the code which was provided by a forum user at this thread:
http://www.plctalk.net/qanda/showthread.php?t=86563&highlight=wago+email

However, I am not able to get the function to work. My experience has been with C and I am still trying to get my head around CoDeSys and I know I am either missing something or not calling the function correctly.

I believe I set up the Function Block correctly with the code above. I also created a PRG POU called Test where I am trying to call the Function but I am unable to get it to work/compile.

I have attached some screen shots of what I've got and would appreciate it if someone would tell me what I am doing incorrectly.

Thank you.

screenshot1.png screenshot2.png
 
You are trying to call FB in variable declaration table, you should call it in program just like you call the MainClient in FB
 
I'm not familiar with CoDeSys, but even if it does support variable parameter lists, your formal declaration doesn't define that.

Your actual parameter list doesn't match the formal parameter list.

There looks to be other syntax errors as well. Once the syntax of the invocation of SendMsg() is corrected, it probably needs to be moved.
 
Maybe something like this would work.
Done with twincat 3 becouse dont have codesys installed, but should still work.

screenshot2.png
 
Hello,

I have recently started learning how to program PLCs using CoDeSys v 2.3 and a Wago 750-871 controller.

Thanks to a couple of forum users, I was able to get over a stumbling block last week with another issue, however, I have run into a new challenge today.

I would like to set up a simple function to send a test email and used the code which was provided by a forum user at this thread:
http://www.plctalk.net/qanda/showthread.php?t=86563&highlight=wago+email

However, I am not able to get the function to work. My experience has been with C and I am still trying to get my head around CoDeSys and I know I am either missing something or not calling the function correctly.

I believe I set up the Function Block correctly with the code above. I also created a PRG POU called Test where I am trying to call the Function but I am unable to get it to work/compile.

I have attached some screen shots of what I've got and would appreciate it if someone would tell me what I am doing incorrectly.

Thank you.

Wago has an application note for this. I'll see if I can get it for you.

Yosi
 
@Jkoso - thank you for your example. I've been able to get everything compiled now but when I try and upload to the PLC, I am receiving some "Unresolved external POUs" error.

I'm wondering if the library I'm using is appropriate...

screenshot3.png
 
Last edited:
@Jkoso - thank you for your example. I've been able to get everything compiled now but when I try and upload to the PLC, I am receiving some "Unresolved external POUs" error.

I'm wondering if the library I'm using is appropriate...

To be honest you are using an older controller, one long out of production. The newer units , even the CoDeSys 2 units have better security built in. I do remember having an issue with the original fb which didn't support the level of security typical today.

My recommendation is to locate that fb (I can try and find it for you next week) and if that doesn't work look for an up-to-date controller like a 750-881 minimum.

Yosi
 
To be honest you are using an older controller, one long out of production. The newer units , even the CoDeSys 2 units have better security built in. I do remember having an issue with the original fb which didn't support the level of security typical today.

Ya maybe that's the case. It's a shame because I've got a few of these and want to build some useful projects.

I am wondering, however, if I would have the same problem if I use a non-SSL based SMTP server? For example, just a regular port 25 server.

Is there a particular library I can use for that purpose?
 

Similar Topics

Hi, I have never used modbus communication in Codesys 2.3, any tips and tricks are much appreciated. The system is a Wago 750-881 that controls...
Replies
3
Views
1,855
Codesys Ethernet IP Scanner - Won't connect to a Wago 750-353. The Ethernet device and the Ethernet IP Scanner are both running. but then I go...
Replies
2
Views
1,669
Hello, Maybe it is just a simple problem, but I cannot solve it. I have a Wago 750-881 connected to a Beier HMI through IP TCP, the connection is...
Replies
0
Views
896
I am using Codesys and have an offline copy of the PLC program. I am trying to login to a Wago 750-881 that supposedly has the same program...
Replies
1
Views
4,499
Hi id like to connect my wago controller with mitsubishi hmi and im using codesys 2.3 and gx designer 3. Id like to know how i know what register...
Replies
5
Views
4,665
Back
Top Bottom