Author Topic: MC024-120 as slave to MC050-118 or MC050-018  (Read 21614 times)

Offline Mike AA

  • PLUS+1 Guru
  • *****
  • Posts: 109
  • Karma: +0/-0
    • Dewind Dewatering
MC024-120 as slave to MC050-118 or MC050-018
« on: September 06, 2017, 05:31:12 PM »
I am having some minor issues with using a MC024-120 as a slave to my MC050-118.

First off I am using the MC024-120 instead of an IO module because I need counting ability for the sensors connected to the MC024-120.

I have a motor driven water valve running off 2 relays which get their coil power from 2 output pins of the MC024-120. This gets the signal to turn on the relays from the MC050-118 which gets its signal from a momentary switch. I am getting quite a bit of lag, as much as 2 or 3 seconds from time I hit the switch to the time the motor starts moving and also from releasing the switch to the time the motor stop moving. This delay makes tuning how far the valve should be open difficult. I could see the data on the canbus when I hit the switch fairly quickly and I am now wondering if the RX on the CAN is slower for some reason? Does anyone use this kind of setup for one MC to control another MC to control a simple on/off or should I try running this function off a separate IO module?

Thanks,
Mike

Offline FluidPowerTom

  • PLUS+1 Guru
  • *****
  • Posts: 363
  • Karma: +32/-0
Re: MC024-120 as slave to MC050-118 or MC050-018
« Reply #1 on: September 07, 2017, 12:02:49 AM »
I've used multiple PLUS1 controllers on a CAN bus before and had them interact without any issue, but I wasn't specifically doing something like this.  What are your CAN transmit times set to?  Have you put checkpoints in the program to make sure the delay is definitely caused by lag in the message being received?  I'd put some checkpoints right off the CAN receive logic and verify that's it.
Controls Engineer
Hydra-Power Systems

Offline acmall

  • PLUS+1 Guru
  • *****
  • Posts: 191
  • Karma: +35/-1
Re: MC024-120 as slave to MC050-118 or MC050-018
« Reply #2 on: September 07, 2017, 09:00:12 AM »
We also have machines with multiple controllers were the outputs on one controller respond to inputs on another. I have never had any issues with delays. As FluidPowerTom has suggested checkpoints at various points in the program will help identify where the delay is actually happening.

Alastair

Offline Mike AA

  • PLUS+1 Guru
  • *****
  • Posts: 109
  • Karma: +0/-0
    • Dewind Dewatering
Re: MC024-120 as slave to MC050-118 or MC050-018
« Reply #3 on: September 07, 2017, 01:30:11 PM »
Where am I going to look to find my CAN transmit time? If there is a default that's what I am using.

Once I get my spare slave control box back in hand I will check the check points. I was in a crunch at the time so I ended up just going hardwired to the valve to make everything more responsive.

Thanks,
Mike

Offline niteRider

  • PLUS+1 Developer
  • ***
  • Posts: 45
  • Karma: +3/-0
Re: MC024-120 as slave to MC050-118 or MC050-018
« Reply #4 on: September 07, 2017, 05:25:18 PM »
Enter the CAN TX Block page, and you will find an oscillator that sets the transmit repetition.  You can also use something else the trigger the transmit (like a button press or other logical transition) if that works better... that is useful for keeping buss load down, too (see attached).

Default TX repetition is 1/second.

Offline Marbek_Elektronik

  • PLUS+1 Guru
  • *****
  • Posts: 350
  • Karma: +8/-0
    • Marbek Elektronik
Re: MC024-120 as slave to MC050-118 or MC050-018
« Reply #5 on: September 08, 2017, 09:49:54 AM »
Have you watched the can-traffic on the bus? Is it much more than 60%?
You can do this with can-king. (I only use Kvaser CanKing, it's newer)
Marbek Elektronik, Dipl.-Ing. Bernd Konrad
Dienstleistung, Entwicklung, Herstellung

Offline Mike AA

  • PLUS+1 Guru
  • *****
  • Posts: 109
  • Karma: +0/-0
    • Dewind Dewatering
Re: MC024-120 as slave to MC050-118 or MC050-018
« Reply #6 on: September 08, 2017, 01:24:59 PM »
niteRider,

All the transmit are indeed default 1 second trigger. I didn't realize this was here and I will definately use your idea using a button or other logic to transmit as there are a lot of things that only transmit a couple times a day and I could free up CAN traffic.

Marbek_Electronik,
With service tool connected and canking running I believe I am running about 60-70%. I do not have a fully connected machine on site right now to verify. I will be getting the last components brought to me this weekend and I can verify the traffic. If I use niteRider's idea for limiting the can transmit for some items I could easily decrease usage.

Mike
« Last Edit: September 08, 2017, 01:26:53 PM by mikeaa12 »

Offline FluidPowerTom

  • PLUS+1 Guru
  • *****
  • Posts: 363
  • Karma: +32/-0
Re: MC024-120 as slave to MC050-118 or MC050-018
« Reply #7 on: September 08, 2017, 06:35:06 PM »
A CAN bus load of 60-70% is actually very high.  I've worked on systems with over a dozen PLUS+1 controllers and other CAN devices that have a lower bus load.  Granted, it all depends on how much data you need to send and how quickly, but that's an extremely high bus load.    If you're working with an MC050 you may want to divide it up by using both CAN buses on the controller.

Definitely go through your code and make sure transmit rates aren't faster than necessary.
Controls Engineer
Hydra-Power Systems

Offline spittet

  • PLUS+1 Guru
  • *****
  • Posts: 117
  • Karma: +6/-1
Re: MC024-120 as slave to MC050-118 or MC050-018
« Reply #8 on: September 08, 2017, 07:02:49 PM »
Also, you shouldn't monitor traffic while Service Tool is running and logging because Service Tool may request a lot of checkpoints values from all your PLUS1 controllers, so you will not monitor the standard bus load when normal usage of the machine.

Set Service Tool to "Offline" before starting CANKing to monitor traffic.

Sam

Offline Mike AA

  • PLUS+1 Guru
  • *****
  • Posts: 109
  • Karma: +0/-0
    • Dewind Dewatering
Re: MC024-120 as slave to MC050-118 or MC050-018
« Reply #9 on: September 12, 2017, 03:34:08 PM »
CANKing shows my CAN bandwidth at about 38% with everything hooked up and service tool offline. With a checkpoint at both the watervalve tx and rx I do see a delay, as much as 2 seconds, but doesn't seem to be consistent so I believe this is a can tx/rx issue. I am going to change the timing to match the control turning my valve on and off so I don't have the one second delay. I haven't changed any other can timings yet but definitely will to cleanup the traffic.

EDIT: Just to see what would happen I adjusted the timing from 1 second to half a second and the valve responds... in half the time. So its definately a can TX refresh issue so I need to figure out logic that will cycle the can TX quickly while the switch is in either position.

EDIT: I just found a can TX that was constantly updating without any delay. My can bus load is now at 14-17% with or without service tool enabled.

Thanks guys!
Mike
« Last Edit: September 12, 2017, 05:49:50 PM by mikeaa12 »

Offline shellhigh

  • PLUS+1 Novice
  • *
  • Posts: 1
  • Karma: +0/-0
Re: MC024-120 as slave to MC050-118 or MC050-018
« Reply #10 on: October 03, 2018, 10:19:24 AM »
I've used multiple PLUS1 controllers on a CAN Hydromax results bus before and had them interact without any issue, but I wasn't specifically doing something like this.  What are your CAN transmit times set to in Hydromax X30 pictures?  Have you put checkpoints in the program to make sure the delay is definitely caused by lag in the message being received in pumps?  I'd put some checkpoints right off the CAN receive logic and verify the results that's it.

We also have machines with multiple controllers were the outputs on one controller respond to inputs on another. I have never had any issues with delays.
« Last Edit: October 08, 2018, 12:41:02 PM by shellhigh »