You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
Using libfins to read registers from an Omron CJ2m-CPU31.
When I attempt to read any Data registers (Dnnnnn) I get an invalid read area returned... e.g.
Let me answer my own question in case someone else comes across this --
in fins_search.c the "D"ata registers are expected to be labeled "DM" (Data Memory).
so, for my part as the end-users will follow the vendors documentation to enter the register addresses, I copied the three "DM" lines and updated to allow "D" registers -- that is:
Copy code around by making redundant multiple lines to reference the same memory areas is not a fix, nor helpful to others, but rather an attempt to make a mess of the code.
Creating a pull request with proper documentation might have been more helpful.
Hello,
Using libfins to read registers from an Omron CJ2m-CPU31.
When I attempt to read any Data registers (Dnnnnn) I get an invalid read area returned... e.g.
uint16_t arr[2048];
int num = 16;
int read_ret;
memset(&arr, 0, sizeof(arr));
read_ret = finslib_memory_area_read_uint16(sys, "D00100", arr, num);
Perhaps something is not initialized correctly? Or I don't fully understand the D registers...
Rgds.
The text was updated successfully, but these errors were encountered: