Hello Guest it is March 29, 2024, 06:02:51 AM

Author Topic: Modbus Config and Register issues  (Read 811 times)

0 Members and 1 Guest are viewing this topic.

Offline bcoop

*
  •  61 61
    • View Profile
Modbus Config and Register issues
« on: March 17, 2020, 07:27:51 PM »
I have my delta Spindle drive connected to Mach4 via Modbus RTU 485.  Everything is talking as it should. but i have valve in the drive that provides output frequency to the motor, the range is something like 100-400Hz. 
Problem 1
the decimal valve is 40,000 for 400 hz. what is happening is once the  valve reaches 32767 the msb goes high and turns the value into a negative number so It appears that in Mach4 Integers are signed values, is there a way to configure for unsigned ?  so I can get  0-65535

Problem 2
Same drive,  trying to get values of specific status bits,  I configured a modbus device to read a holding register (0x3H) and set the checkbox for i/o bit packing so that each of the 16 bits values are separated valves (bools) the issue is when looking for this bit in the Mach4 Register plugin,  they do not appear,  all other holding registers appear as long as they are not configured for bit packing,  so my question is, how can i use these bits in mach4 screens if i can not access the register.

Screenshots



Bob

Offline bcoop

*
  •  61 61
    • View Profile
Re: Modbus Config and Register issues
« Reply #1 on: March 17, 2020, 08:00:44 PM »
Tested the Signed/unsigned Integer with a modbus test app, and it works  correctly,  as an unsigned value, 
screen shot supplied.
Bob
Re: Modbus Config and Register issues
« Reply #2 on: October 29, 2021, 12:57:39 AM »
was this solved?
Re: Modbus Config and Register issues
« Reply #3 on: January 27, 2024, 01:15:51 PM »
I'm actually having this same issue.  The "packed" input is showing up as a single signal instead of the individual registers that the modbus plugin claims exist.

How did you access these signals? I'm hoping you can write to them individually instead of only as a single value. (I think a bitwise "and" or something would be needed if it isn't in there already behind the scenes)
Re: Modbus Config and Register issues
« Reply #4 on: February 08, 2024, 01:07:01 PM »
OK, replying here because this obviously isn't an issue:

I got back to this and realized that the problem fixed itself.... :(

To use the modbus bitpacking, it is necessary to restart Mach to apply the changes.  If you just make the new registers in the modbus window, they will not show up as inputs/outputs until some number of files have been reloaded.

oops! saved me some headache though!