Delta MS300 VFD, RS485, RPI4, QTdragon, getting it to work

More
2 years 9 months ago - 2 years 9 months ago #289984 by Calysto
I'm just talking to myself, that helps too :-)

So, it depends on your VFD what kind of read/write types are supported. In my manual there is no paragraph about that, but there is something that looks like it. They are talking about the following functions:

fnct_03_read_holding_registers (03 = 0x03)
fnct_06_write_single_register (06 = 0x06)
fnct_16_write_multiple_registers (16 = 0x10)

So, that's where I have to deal with.
I'm afraid that I need conversions in my HAL-file then....
 
Last edit: 2 years 9 months ago by Calysto.
The following user(s) said Thank You: tommylight

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

More
2 years 9 months ago #290002 by tommylight

I'm just talking to myself, that helps too :-)
I did read it :)
I try to read everything, not always possible.
The following user(s) said Thank You: Calysto

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

More
2 years 9 months ago #290101 by Calysto
:-) Maybe I want to much....  I found this on the printnc discord. I guess I have to do it like this.... Although my brain says: that can't be in 2024!!! :-) Mux-ing and scaling should be done bij mb2hal, but that's my opinion.
Code:
#******************* #  SPINDLE #******************* # Start/Stop -- Command Selector Mux loadrt mux4 names=mux4.runmode addf mux4.runmode servo-thread # bit 0-1 : Stop=0b01, Run=0b10 # bit 2-3 : reserved # bit 4-5 : Fwd=0b01, Rev=0b10 # Fwd command: 0x0012 -> 18 # Rev command: 0x0022 -> 34 # Stop command: 0x0001 -> 1 setp mux4.runmode.in0 1        # Stop setp mux4.runmode.in1 34    # Reverse setp mux4.runmode.in2 1        # Stop setp mux4.runmode.in3 18    # Forward net spindle-on        spindle.0.on => mux4.runmode.sel0 net spindle-fwd        spindle.0.forward => mux4.runmode.sel1 net spindle-runmode    mux4.runmode.out => mb2hal.spindle_runmode.command # Speed loadrt mult2 names=mult2.speedmult,mult2.fbspeedmult addf mult2.speedmult servo-thread addf mult2.fbspeedmult servo-thread loadrt near addf near.0 servo-thread setp mult2.speedmult.in0 100 net spindle-setpoint    spindle.0.speed-out-rps-abs => mult2.speedmult.in1 net spindle-freq    mb2hal.spindle_speed.freq_hz <= mult2.speedmult.out setp mult2.fbspeedmult.in0 0.6 net spindle-freq-fb    mult2.fbspeedmult.in1 <= mb2hal.spindle_speed_feedback.fb_freq_hz.float net spindle-speed-fb    <= mult2.fbspeedmult.out setp near.0.scale 1.01 net spindle-setpoint-rpm    spindle.0.speed-out-abs    => near.0.in1 net spindle-speed-fb        => near.0.in2 net spindle-at-speed    spindle.0.at-speed <= near.0.out
 

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

More
2 years 9 months ago #290106 by pawel77
Hi Calysto,
before communicating with VFD via Modbus I would buy a simple modbus input/output relay and start practicing modbus and MB2hal.

Do you know if is it possible to position spindle with MS300?


 

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

More
2 years 9 months ago - 2 years 9 months ago #290193 by Calysto
A few days ago I didn't know anything about modbus... now I know much more... The most important thing is that I've learn that not every device supports reading at bit-level, that's why I see people using mux4/enum/weighted_sum.

The Delta MS300 manual says that adres 2000H, bit 0 and1 made high, should make it able to Jog... but I've never used it. I also don't know if that is spindle depended.There is a lot to read about jogging in the manual, but I'll probably never use it
Last edit: 2 years 9 months ago by Calysto.

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

More
2 years 9 months ago #290202 by Calysto
To make things even more interesting (or difficult :-)) I will also try Mesa_modbus. I'm not sure if it will work with my 7c80, but there is a serial port on it, it should be on with my firmware. Wil test everything later... my machine is not nearby....

Mesa_modbus config-file I've made so far:
Code:
static const hm2_modbus_chan_descriptor_t channels[] = { /*  {TYPE,     FUNC, ADDR,   COUNT, pin_name} */     {HAL_BIT,   3,   0x2000, 6,   "runbits"},     {HAL_FLOAT, 3,   0x2001, 1,   "freq"},     {HAL_FLOAT, 6,   0x2106, 1,   "volt"},     {HAL_FLOAT, 6,   0x210A, 1,   "amp"},     {HAL_S32,   6,   0x210C, 1,   "rpm-out"}, };
The following user(s) said Thank You: PHILCOAST

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

Time to create page: 0.144 seconds
Powered by Kunena Forum