Hello Guest it is April 19, 2024, 06:57:01 PM

Author Topic: modbus  (Read 8055 times)

0 Members and 1 Guest are viewing this topic.

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: modbus
« Reply #10 on: October 22, 2010, 06:43:52 PM »
Stirling, you can write to/from the mod bus, using the OLD style modbus, not the new plugin modbus, for the new on you haev to do indirect via, Brians....

the Wiki, under modbus has the calls for OLD style serial MB to send/receive data....

scott
fun times

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: modbus
« Reply #11 on: October 23, 2010, 11:58:17 AM »
Hi Scott

I've not been able to find anywhere in the wiki where you can WRITE to a modbus slave from Mach OTHER than via autopolling. The wiki promises you can use direct access but gives you no clue as to how. I don't really want to use autopolling because all I want to do is send the reference voltage the THC should use for any particular cut setup. I just need to do that once per run when the cycle start is hit. The THC has enough to do without continually being polled unneccessarily so hence my desire to use direct access.

Terry

The THC is my own design - hardware and software and so I can make it use any protocol I like. I thought I'd try modbus because it seemed the obvious way to communicate with a bespoke device via serial from Mach - BUT I guess not. Like I said earlier, I'll just re-jig the serial hardware interface and use Mach's sendSerial. All other comms between the THC and Mach are done conventionally via Torch On/Up/Down etc. it's just that one serial tx I need to send the required voltage.

Thanks both

Ian

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: modbus
« Reply #12 on: October 23, 2010, 12:55:51 PM »
Ian keep us up to date (;-) There IS a need for a good simple thc .Now I am sure it is NOT simple but you get the idea.

(;-) TP

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: modbus
« Reply #13 on: October 24, 2010, 06:22:12 AM »
Would that life was so simple. At the moment my THC is designed to work only with the hypertherm range as they're the only systems I've come accross that have a ready built in interface. I may look at a more generalized system at some point but here in Europe a system that requires the user to insert a custom interface into a plasma unit presents quite a challange from a H&S/legal/warranty perspective so I'm not sure there's any milage in it sadly - unless someone can tell me otherwise.

Ian

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: modbus
« Reply #14 on: October 24, 2010, 09:09:38 AM »
oh, ok......

Here is two other possilbe simple solutions, one you do the other buy off the shelf stuff.......

1).  since you only need a voltage to send, at start up of m3, (or on changes?)
      convert your voltage to a BYTE format, and send each BIT if it is a 1, to one
      of m3's 8 OUTPUTs, this could be an standard piece of CAT5 cable wiht RJ's on each end.
      in your hardware, you look at the pattern of on/off on the 8 wires, and rebuild the byte,
      and convert it back to a number, that represents you voltage.
           You could put an "Init" macro in mach that would pull the starting voltage from a DRO,
      on your screen, converts it to a BYTE, sends it as 8 output lines each line representing one BIT.
     Your hardware reads the value, converts it to a number, and sets the voltage with it.

          1A). If you did need to make a run time change of the voltage, just put a screen button,
                 that has the "sending code" discussed above, your hardware could note that the value
                 in its register has changed, and set to volt to a new level.

2). Off the shelf solutions, use PLC with analog card (I have used ADC DL05 with analog card for THC, you can ajdust the PID
loop as well, so that you can elimitate "Dive" and get intellegent control), cost of that is about 300.00 US funds.
2A). Since you might want other intellegent IO, try a MESA board.  The stuff like the PK, MODIO, Modbus board, are tied to some kind of continual update loop, for there analog outputs. The PK, I could put a "run once" in it on an analog or IO pattern for you. BUT, I think fx issolation would be an ongoing issue with the Plazma.

3). As a side note: Brian released a "General Serial" plugin template, you could download and modify that for your needs.
or pay some poor sap like me, or Steve, or Ed to do it for you, or yourself.....hehehhee.

scott
           
fun times

Offline stirling

*
  • *
  •  2,188 2,188
  • UK
    • View Profile
    • www.razordance.co.uk
Re: modbus
« Reply #15 on: October 24, 2010, 11:41:51 AM »
hmmmmm - I think I'll do as I said earlier to Terry and re-jig my hardware. I'll disconnect the DTR which I use to signal a THC CPU reset when uploading the firmware to my board and then I can use sendSerial to send my required ref voltage. I'll just need to re-connect it to do the firmware updates as and when. Might even stick a gate in there and then I can control whether DTR is acted on or not via another input to the board.

Ian