Home AMX User Forum AMXForums Archive Threads AMX Applications and Solutions VisualArchitect

Adding AxLink devices

Hi All

I stumbled upon something and it would be great to hear your tipps and opinions.

I have a relay box which is connected directly to AxLink. Now I can create a SNAPI module with Cafe Duet which provides functionality to switch relays. The Code Builder provides the function and the code is generated correctly.

BUT: I cannot connect the module to AxLink but only to a NI-Relay as the connection type is 'Relay'

Is there a possibility to add an AxLink device? Or is this just not possible?
How would you deal with that if you want to provide a simple solution to those who use VA?


Thanks for any hint.
Sorin

Comments

  • AMXJeffAMXJeff Posts: 450
    soma wrote: »
    Hi All

    I stumbled upon something and it would be great to hear your tipps and opinions.

    I have a relay box which is connected directly to AxLink. Now I can create a SNAPI module with Cafe Duet which provides functionality to switch relays. The Code Builder provides the function and the code is generated correctly.

    BUT: I cannot connect the module to AxLink but only to a NI-Relay as the connection type is 'Relay'

    Is there a possibility to add an AxLink device? Or is this just not possible?
    How would you deal with that if you want to provide a simple solution to those who use VA?


    Thanks for any hint.
    Sorin

    There is no real difference on how to control an axlink relay device versus a netlinx relay device. The device address instructs the code what device to control. On the AxLink device there is a set of dip switches that assign the address of the relay box. You can use the AMX program called "DIP Switch" to set the switches correctly.

    Let say you set the dip switch for address 96.

    The correct DPS for this address is 96:1:0.

    To turn on relay 1 of the axlink device.

    On[96:1:0,1]
  • somasoma Posts: 5
    Hey Jeff

    Thanks for your reply. It seems I did not make myself clear. I have been an AMX programmer for several years and I do not have any questions on how to control a relay in general ;-)

    I try to create a Cafe Duet module which can be used by VA users to control a relay box which is connected to the AxLink bus. I wrote such a module and implemented the necessary SEND_COMMANDS (eg. 'RELAYCHANNELSTATE-1,ON'). I added the module to VA and I am able to drag it to the main screen.

    The only thing I can't do is to get the module to connect to the AxLink bus because apparentely it is not possible to add a 'native NetLinx device'. Our module box contains a AXP-CPI16 and is connected directly to AxLink.

    So for now I always have to change the device after generating code. I'd like to assign the module a device in the AxLink range (1-255) so I don't have to do that manually.

    I hope this helps to clarify my question.

    -soma
  • Hi soma,

    one possible solution i can think of is the use of 'custom.axi'. I am not an every day VA user but maybe with some effort you will be able to connect your module to another device (virtual ?) and in the 'custom.axi' you can link the trigger of the 'other' device with the relay.

    Kostas
  • somasoma Posts: 5
    Hi papadouk

    Sounds like what I need. Can you be a bit more specific? I am an experienced Java and NetLinx programmer but I have no real experience in VA... How to deal this custom.axi? Is there a documentation?

    I will do some research later. Thanks for your reply.

    -soma
  • ericmedleyericmedley Posts: 4,177
    I have ran into a few DUET modules that cannot talk to the older AXB/AXC devices, in particular serial interfaces and IR. The module might be looking for a response to a particular command such as GET_BAID which will not show up on some of the older boxes that have dip switch settings for such things. Just a thought...
  • viningvining Posts: 4,368
    quibralj wrote: »
    how can you be a programmer if you don't know how to connect these devices? LOL
    Why revive an old, dead thread without something constructive to add?
Sign In or Register to comment.