FutureHorizon
Hi Thiago @thiagoralves
 
I'm not sure, but I believe that I found a bug in the simulator.
 
I'm playing around with OpenPlc and Fuxa and I created a modbus TCP device to have some data to read from Fuxa.
 
I have the debugger running and I hava a vallue that I set i fixed 1700. When I force the value to 1800, the actual value becomes 2055. The value datatype is WORD, but I get the same symptom with an int type.
 
I am still trying to solve the real conversion problem and I actually get the expected value in Fuxa now, so some progress is made!
 
If I force an integer to 8000, the value is 16415. It's probably a register shift or something like that.
[203128%2F9687983%2Fmceclip0]
Reply 0 0
thiagoralves
Can you share the actual project and the steps you made so we can reproduce the issue?
Reply 0 0
FutureHorizon
So, today it is working as expected. I did not make any changes, but when I went to connect to the runtime I got a program mismatch.
I did not have this error yesterday, but I downloaded and now it is working as expected.
Reply 0 0
FutureHorizon
Seeems to be a program mismatch between editor and runtime. I did some swithcing back and forth between compile only and compile with download, perhaps this caused an undetected mismatch in the runtime or debugger. Anyway, it seems to be working as expected now.
Reply 0 0
thiagoralves
Perfect! Indeed the recommended approach is to always download before debug. If the md5 fails to check inconsistencies for any reason then you will be debugging a different program than what you have on the board and this will cause inconsistencies
Reply 0 0
FutureHorizon
I just found another issue, it is difficult to explain, but i'll try.
I created a FB to convert real to two registers. It finally works, I spent 2 days on this to find the exact approach that the compiler will accept.
It was really tricky to get to work and I had to try ALL the methods that did not work before finding the one that did.
 
Anyway, I instantiated this function block once and clicked the + button to create a new instance. But it seems that the reference for the new instances are still to the first one. So when I compile, I get
 
iec22c process exited with code 1.
Internal compiler error in file generate_c_cc at line 473.
Stopping compilation process.
 
When I changed the name og the forst instancce of my conction block, I was asked of all references to that should be changed, which I accepted, but that changed the names of several instances of the new instances.
 
I think it has to do with the instance I choose from the dropdown. I just chose the first and then added the sequential number myself. But by selecting the first I set the reference to the first instance.
Reply 0 0
Write a reply...
Reply