NMEA Serial data read in Control win v3 x64
CODESYS Forge
talk
(Thread)
NMEA Serial data read in Control win v3 x64
Last updated: 2025-10-16
blog Discussion
xcqt
blog
(Discussion)
Forum for blog comments
Last updated: 2025-10-16
Post by sajid on NMEA Serial data read in Control win v3 x64
CODESYS Forge
talk
(Post)
I am using the SerialCom example program from the CODESYS website to read NMEA strings in CODESYS Control Win V3 x64 through a serial-to-USB converter. However, I occasionally receive only partial data or encounter errors in the received string. A screenshot of expected NMEA string attached for reference. Could you please advise on how to ensure the full NMEA string is received consistently? Error in strRead variable is <value of="" the="" expression="" cannot="" be="" retrieved=""></value>
Last updated: 2025-10-16
Post by sajid on NMEA Serial data read in Control win v3 x64
CODESYS Forge
talk
(Post)
I am using the SerialCom example program from the CODESYS website to read NMEA strings in CODESYS Control Win V3 x64 through a serial-to-USB converter. However, I occasionally receive only partial data or encounter errors in the received string. A screenshot of expected NMEA string attached for reference. Could you please advise on how to ensure the full NMEA string is received consistently? Error in strRead variable is <value of="" the="" expression="" cannot="" be="" retrieved=""></value>
Last updated: 2025-10-16
NMEA Serial data read in Control win v3 x64
CODESYS Forge
talk
(Thread)
NMEA Serial data read in Control win v3 x64
Last updated: 2025-10-16
Post by xcqt on Oop best practice
CODESYS Forge
talk
(Post)
Hi all, I’m currently trying to improve my OOP structure in CODESYS and I’m looking for some input on how others approach this. I understand the basics like inheritance, interfaces, abstract FBs, methods, and properties, but I still struggle a bit with the overall architecture and what’s considered clean or scalable in bigger projects. As an example, I’m working on two different energy meter function blocks: FB_EnergyMeter_MQTT reads data from MQTT (strings) FB_EnergyMeter_Modbus reads data from Modbus (words) Both have their own Update() method and implement the same interface (something like IF_EnergyMeter). Later on, I’ll probably add more meter types, but they should all behave the same from the controller’s point of view. Now, there’s a FB_GridControl block that needs power data from these meters. I see two options here: Define the meter blocks inside FB_GridControl and call them directly (for example fbModbusMeter.UpdateModbus()). Keep the meter blocks outside and pass them into FB_GridControl as interface references, so the control block doesn’t know which specific type of meter it’s dealing with. Option 2 feels cleaner and more flexible to me, but I’m not entirely sure how to handle the data flow in that case. Should I pass the meter instance through an interface reference (REFERENCE TO IF_EnergyMeter)? Or is there a better way to link the external FBs to the control block? I’d like to hear how you structure this kind of setup or see an example from someone who has done something similar. EDIT: I think i need to do something like this fbModbusUpdateInput(wInput:= wWordValue); fbMqttUpdateInput(strInput:= strStringValue); IF bUseMqtt THEN Meter REF = fbMqttUpdateInput; ELSE Meter REF = fbModbusUpdateInput; END_IF fbControl.SetMeter(UsedMeter := Meter); Or am i thinking wrong? Thanks, Thomas
Last updated: 2025-10-16
Oop best practice
CODESYS Forge
talk
(Thread)
Oop best practice
Last updated: 2025-10-16
wiki Discussion
xcqt
wiki
(Discussion)
Forum for wiki comments
Last updated: 2025-10-16
(no subject)
xcqt
wiki
(Thread)
Last updated: 2025-10-16
Home
xcqt
wiki
(WikiPage)
Project Members: xcqt (admin)
Last updated: 2025-10-16
wiki Discussion
damoogman
wiki
(Discussion)
Forum for wiki comments
Last updated: 2025-10-15
blog Discussion
damoogman
blog
(Discussion)
Forum for blog comments
Last updated: 2025-10-15
Home
etalp
wiki
(WikiPage)
Project Members: etalp (admin)
Last updated: 2025-10-15
Post by etalp on Eaton XC303 firmware update via USB
CODESYS Forge
talk
(Post)
Hi, I'm struggling with updating my xc303 to firmware 3.5.17. It is possible only via USB port. I've installed proper update files on the USB then plug it into the PLC's USB port and restarted the device. Shortly after LED's on the PLC started to blink, so updating process has started. But after 10 minutes the PLC LED turned off and after all I could't serach for this PLC in Codesys, but could ping it. Could someone eplain to me proper procedure of updating the fimrware in XC303 via USB? Is it neccesary to STOP the PLC switch after pluging the USB?
Last updated: 2025-10-15
Home (version 1) discussion
tarpas
wiki
(Thread)
Home (version 1) discussion
Last updated: 2025-10-16
wiki Discussion
sajid
wiki
(Discussion)
Forum for wiki comments
Last updated: 2025-10-16
blog Discussion
sajid
blog
(Discussion)
Forum for blog comments
Last updated: 2025-10-16
(no subject)
damoogman
wiki
(Thread)
Last updated: 2025-10-15
Home
damoogman
wiki
(WikiPage)
Project Members: damoogman (admin)
Last updated: 2025-10-15
(no subject)
sajid
wiki
(Thread)
Last updated: 2025-10-16
Home
sajid
wiki
(WikiPage)
Project Members: sajid (admin)
Last updated: 2025-10-16
Home (version 1) discussion
etalp
wiki
(Thread)
Home (version 1) discussion
Last updated: 2025-10-16
wiki Discussion
tobl-88
wiki
(Discussion)
Forum for wiki comments
Last updated: 2025-10-16
blog Discussion
tobl-88
blog
(Discussion)
Forum for blog comments
Last updated: 2025-10-16
Home
tobl-88
wiki
(WikiPage)
Project Members: tobl-88 (admin)
Last updated: 2025-10-16