Hello Guest it is March 28, 2024, 06:40:28 AM

Author Topic: Serial Modbus  (Read 4394 times)

0 Members and 1 Guest are viewing this topic.

Offline CJEls

*
  •  69 69
    • View Profile
Serial Modbus
« on: August 06, 2008, 12:35:10 PM »
Hi All

I have A probleme With a second serial modbus Card These Boards are Arturo M12 serial modbus Boards. My first Board is working Great but I ran out Off inputs so I decide to fit the second pcb.When I check the pcb in Modbus  set up under the test Screen the inpus work .But the brain that i wrote does not see the Inputs.I  the brain You select serial modbus, starting pin 16 because it is the second pcb and  it is the first input. then You use a lobe(no operation) nop and then you terminate with a the cycle start putton press. Then you Close mach and restart. You enable the brain and restart again. then when you view the brain and press the cycle start button (external) nothing happens. What am I doing wrong.

Thanks

CJ

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Serial Modbus
« Reply #1 on: August 06, 2008, 09:45:02 PM »
Please if you can, be more clear........

The order of the boards is important.

do you have a M11 followed by M12 as slave, or M12 followed by a second M12 as slave?

For instance, if you are doing an M11 with a M12 slave/expansion, then your I and O is 0-27 as in total

Iin this set up your:
config (0) (for discrete outputs), will be Address 1000, # reg 28, local var start (0), input discrete type.
config (1) (for discrete inputs), will be Address 2000, # reg 28, local var start (0), ouput coils type.
config (2) (for ana outputs), will be Address 3000, # reg 4, local var start (0),  Output holding type.
config (3) (for ana inputs), will be Address 4000, # reg 4, local var start (0),  input reg.
config (5) (MPG), will be Address 5000, # reg 2, local var start (0), Input holding type.

In your Brain (I recommend One brain for each config type, but thats up to you).  On your discrete Inputs in your brain You will need to open and edit your brain, then reload it and reenable it, you next input after you add the second board, would be: 
 "Serial Plugin, Modbus Input 16 , config 1"  in this case Your Local Var: Serial Plugin, Modbus 16 would also = local var 16 and that would = input pin "0" on your second board.

scott




fun times

Offline CJEls

*
  •  69 69
    • View Profile
Re: Serial Modbus
« Reply #2 on: August 07, 2008, 12:45:05 AM »
HI Poppabear

Yes I do use 2 M 12 PCB boards.Then I will have 24 inputs and 24 outputs. 8 analog input and 8 analog outputs.I first set up only one M 12 pcb and got that working Fine. then I wanted to and the second M12 Pcb. As soon As I change My config In the mobbus setup To 24 Inputs 24 outputs 8 analog outputs 8 analog input and 2  encoder inputs the whole system stops.Then I can not even test the system with modbus test setup. Both boards are working I tasted them Seprately.I must be doing some thing wrong in the setup.

Thank You

CJ

Offline poppabear

*
  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Serial Modbus
« Reply #3 on: August 07, 2008, 05:16:40 PM »
Yeap, If your Using a USB to Serial adapter, then you can bank that is part of the problem.

You will have to stagger your refreashes on your Discrete inputs/outputs at: 50ms, and your analogs at 75 ms.

Post up here some screen shots of your Modbus setup congfig screen, AND your Brians.

scott
fun times

Offline CJEls

*
  •  69 69
    • View Profile
Re: Serial Modbus
« Reply #4 on: August 08, 2008, 05:15:55 AM »
Hallo Scott

I think the serial modbus board stoped working because it was working with one m12 pcb and i can not even get that working it gives me a CRC error all the time.

Thank you for the help I will wait until Aurtro is back from leave.

C J

Offline CJEls

*
  •  69 69
    • View Profile
Re: Serial Modbus
« Reply #5 on: August 08, 2008, 05:19:17 AM »
Hallo Scott

I am not using a usb to serial adaptor but my Machine does have two serila ports and both of them is giving me the same Alarm. I then i tried It on a new pc and had the same alarm.

Thanks

Cj