All Neighborhoods

CODESYS Talk

    CODESYS Forge

  • YIN YIN posted a comment on discussion Visualization πŸ‡¬πŸ‡§

    Hi chaylak, I ran into almost the same 'works in CFC, not in ST' situation a while back, and in my case the function block wasn't the problem at all β€” it was the program around it. First thing I would check is whether this POU actually compiles and downloads as ST. The code you pasted has a VAR_INPUT block with CFC_Motion sitting at the very bottom, after the executable code. In ST all declarations have to come before the body, so a trailing VAR_INPUT like that won't compile, and if the POU never...

  • YIN YIN posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    Thanks for writing this up so clearly β€” I ran into the same wall when I was trying to keep a small table of axis limits read-only once it left the owning function block. The worry was exactly the same: some consumer further down the chain changes a value by accident, and the machine starts behaving differently with no obvious culprit. As far as I know there is still no persistent const reference in ST, so the FB-with-getters route is the one that has held up best for me in practice, even though I...

  • YIN YIN posted a comment on discussion Engineering πŸ‡¬πŸ‡§

    Hi tarek, the short answer is that you can't add the slave in the CODESYS tree, and that's expected rather than a bug. CODESYS itself has no DeviceNet master, so the DeviceNet side of your setup belongs entirely to the EL6752. In the CODESYS device tree the terminal only shows up as an EtherCAT slave, and whatever slaves sit behind it are configured in the terminal's own setup, not in CODESYS. In practice that setup happens in TwinCAT's DeviceNet configurator. That's where you add the valve, give...

  • YIN YIN posted a comment on discussion Runtime πŸ‡¬πŸ‡§

    Hi, since the same setup works from your PC with the USB converter, the Carel side of this is basically proven β€” the 19200/None/1 settings, the address 1 and the FC03 register map all do what they're supposed to. So I'd focus on the PFC200 side, that's where the difference has to be. The first thing I'd check is whether the port is really in RS485 mode and really free. You set serialmode in the PLC shell and the owner to unassigned in WBM, which is the right combination, but the port mode usually...

  • YIN YIN posted a comment on discussion Motion πŸ‡¬πŸ‡§

    Hi, you mention 34 in the title and 36 in the post β€” going by your screenshots, 34 is the one the axis is actually reporting, and that's SMC_AXIS_NOT_READY_FOR_MOTION, meaning the axis never signals that it follows the target values. Both that and the SMC_DI_AXIS_ERROR in your table point at the drive rather than at the MC blocks: the drive has reported an error, and the MC blocks are just passing it on. Your second screenshot backs that up. The master diagnostics show an emergency straight from...