This is my first time programming a PLC, so I probably make a lot of rookie mistakes.
I'm trying to upgrade a keyseater machine by exchanging damaged mechanical parts with new electronics. Because this is my first time working with a PLC, I ordered a cheap FX3U clone on AliExpress, just to try. I'm using a Structured Project in GX Works 2 for programming.
I already got some functions working, but I'm having a bit of trouble with encoder input en position output. I'm using function C250 for a quadrature encoder. This is actually C251 on the original FX3U, so there might be more differences between the original and Ali version. Sometimes C250 works, but sometimes it stays at 0 counts. My first guess, is there a way to "activate" this function? Or should it be always on? I see ladder examples using a coil to write K9999 to C251. But I'm using structured ladder. Is DMOV K9999 to C250 the right way to "activate" this function?
The second problem is D8340. According to the manual, this value is the actual step count of the step/dir output used by DRVI for example. I want to use this value to calculate the tool position. When monitoring this value in GX Works 2, the value is always wrong. Sometimes it keeps changing between 0 and 10 without any inputs or outputs changing. Sometimes a much higher value, don't remember what exactly, but also +/- 10. But what is even more strange, when I have this value on screen while monitoring, other values are wrong. Some closed contacts are open, some open contacts are closed and numeric values are wrong. When I scroll the D8340 label out of view, the values are good. See the attached screenshots. Is this a bug or am I doing something wrong?