Mesa modbus and pktUart

More
3 years 3 months ago #276280 by tommylight
Replied by tommylight on topic Mesa modbus and pktUart
Yup, but i was waiting a bit to see if you read it, so now i go to bed, past 4AM here.
Enjoy the hunt. :)

Please Log in or Create an account to join the conversation.

More
3 years 3 months ago #276298 by camb0
Replied by camb0 on topic Mesa modbus and pktUart
Just checking if you got this working?

I was tipped off on the VFMOD module by Rod when discussing VFD's and a potential purchase of a BD600 VFD for my spindle. I bought the BD600 got that motor up and running and now it got me wondering can I do this via my MESA 7i96->7i76 setup rather than USB.
A bit of searching got me to here, by the looks of it you're pretty close to having that working for your VFD.

I assume with my setup I would do this off the 7i96 TB2 pins 16-19 which are the RS-422/485 pins. And then once you have the commands (channels? from the C file) in hal you should be able to connect them to the spindle control and other pins as needed for the UI etc (apols still learning).

Please Log in or Create an account to join the conversation.

More
3 years 3 months ago #276306 by andypugh
Replied by andypugh on topic Mesa modbus and pktUart
Have you found the docs?
linuxcnc.org/docs/2.9/html/drivers/mesa_modbus.html

It feels like Persei8 hasn't set up pins to control VFD on/off and fwd/reverse?

I have spent some time looking for the config I used for my test BFD (SKI780) bit it looks like I lost it when I decided not to add it to LinuxCNC.

Please Log in or Create an account to join the conversation.

More
3 years 3 months ago #276341 by persei8
Replied by persei8 on topic Mesa modbus and pktUart
I did find that doc and have read it several times. I did also set a pin to control motor on/off (u32   IN     0x00000000  vfd_modbus.00.motor) but I did miss a pin. Things are beginning to slowly sink in so I have to rearrange some code and then rearrange some wires and will report back what happened.
camb0 - yes, those are the pins to connect to your vfd modbus i/f. You may have to reflash your 7i96 board if it doesn't already have the pktuart enabled. Using the mesa card would be quite handy as it frees up a USB port on the computer.
The following user(s) said Thank You: camb0

Please Log in or Create an account to join the conversation.

More
3 years 3 months ago #276377 by andypugh
Replied by andypugh on topic Mesa modbus and pktUart

I did find that doc and have read it several times. I did also set a pin to control motor on/off (u32   IN     0x00000000  vfd_modbus.00.motor) but I did miss a pin.
 
U32 seems wrong for a motor on-off signal. And are you sure that Modbus command 6 is correct?

I would expect the .mod file to have something like:

{HAL_BIT,   5,   0x2000, 1,     "motor"}

Please Log in or Create an account to join the conversation.

More
3 years 3 months ago #276393 by persei8
Replied by persei8 on topic Mesa modbus and pktUart
On the Huanyang GT series, to turn the motor on, you write 0x01 to register 0x1000. To turn it off, you write 0x05 to register 0x1000.
The docs state "In addition to the pins configured in the definition file, each module will create the following pins for each instance of the driver:"
I find that those HAL pins are not created. From the generated C file, I see there are a couple of conditions where the creation is skipped but don't know enough about it to figure out exactly why. There's something it doesn't like about retval in the rtapi_app_main function.
In my postgui HAL file, I instantiate the component with:
Code:
loadrt mesa_modbus ports=hm2_7i96.0.pktuart.0 addf mesa_modbus.00 servo-thread
The module is created with the pins defined in the channel descriptor file, but the additional HAL pins are not created.
Jim

Please Log in or Create an account to join the conversation.

Time to create page: 0.102 seconds
Powered by Kunena Forum