How to design object for this type of device?

I am developing an object for very specific welding device because of its ardware structure.

Communication with device is done using 2 pcs of slave bridge EL6695 modules. The problem is following: 

  1. Device has 2 servo axis which can be controlled using separate commands, so it has to work independently.
  2. For control of Axis 1 the first EL6695 module is used. For Axis 2 the second.
  3. But... Part of data area of first EL6695 is also used for common control of top level section of device which is common to both axes. It has command like PowerOn, PowerOff, ProgNoSelection.

Now I am not sure how to structure my object. I have some scenarios and i would like to know your opinion.

Solution 1

Create command handler for control of common functionality of device and 2 separate objects for both Axis.

Solution 2

Create independent objects. One for control of device itself and 2 other for separete control of Axes.

Do you have any experience with similar task?

 

 

Best reply by Düscha

You can add 2 interfaces to your peripheral.

One for the Axis and one for the device.

Over this two interfaces you can send your state from the peripheral to your booth units.

View original
4 replies
Resolved