C++ OUT port not connecting to IN port

Hello all, i’m still new to c++ development for PLCNext and am bumping into some problems. I’m trying to send data from my PLC to a c++ program and also the other way around. But the latter doesn’t seem to work I have defined the ports as follows in my c++ program [attachment]Screenshot_3.png[/attachment] I get both in the PLCNext engineer but am unable to connect the OUT port from the c++ program. I have defined the variables in PLCNext engineer like this: [attachment]Screenshot_5.png[/attachment] But when i go and try to connect it in the port list it won’t let me. [attachment]Screenshot_4.png[/attachment] Thanks in advance for any help.

Hi Robin, The list of compatible data types between programming languages is in the Info Center, here: https://www.plcnext.help/te/PLCnext_Runtime/Available_data_types.htm You can see that the IEC equivalent of C++ int64 is LINT (long integer), and the C++ equivalent of IEC INT is int16. However, it is possible to copy data from a variable with a „smaller“ type to a variable with a „bigger“ type, but not vice-versa (for obvious reasons, I hope). This explains why you can connect otherwise incompatible port variables in one direction, but not the other. Hope this helps. ~ Martin.

Thank for your reply, The link you sent was very helpfull and got me on my way again.