Home AMX User Forum AMXForums Archive Threads AMX Applications and Solutions

Problem with signal routing ir program

Hello,
my company just started to work with AMX solutions and we already got our first project. I got this job and I'm very excited about it. I will attend in AMX courses whis spring, but anyway - the projects deadline is soon and I have to do it now.

So situation is:

I have connected the 5100i panel to 2100 central unit via wpa250.
The program system is generated by visualArchitect.
When I press any button on touchpannel - the main unit gets button signal, but does not do assigned IR or RS232 output(led's does not indicate)
I guess it can be because of system number. Even I have set (any) system number in visualArchitect - it is written "Connected via ethernet, system 1" in pannel config menu. When I had set 1 system number - pannel wrote "Connected via ethernet, system 0"
a.jpg 213.7K

Comments

  • Thats from netlinx studio diagnostics window:
    Line 215 (11:52:36):: Memory Available = 35816920 <10528>
    Line 216 (11:52:36):: CIpEvent::OnLine 10001:9:1
    Line 217 (11:52:36):: CIpEvent::OnLine 10001:10:1
    Line 218 (11:52:36):: CIpEvent::OnLine 10001:11:1
    Line 219 (11:52:36):: CIpEvent::OnLine 10001:12:1
    Line 220 (11:52:36):: CIpEvent::OnLine 5001:1:1
    Line 221 (11:52:36):: CIpEvent::OnLine 5001:2:1
    Line 222 (11:52:36):: CIpEvent::OnLine 5001:3:1
    Line 223 (11:52:37):: CIpEvent::OnLine 5001:4:1
    Line 224 (11:52:37):: CIpEvent::OnLine 5001:5:1
    Line 225 (11:52:37):: CIpEvent::OnLine 5001:6:1
    Line 226 (11:52:37):: CIpEvent::OnLine 5001:7:1
    Line 227 (11:52:37):: CIpEvent::OnLine 5001:8:1
    Line 228 (11:52:37):: CIpEvent::OnLine 5001:9:1
    Line 229 (11:52:37):: Loading 4 Duet Modules.
    Line 230 (11:52:37):: Memory Available = 35726792 <90128>
    Line 231 (11:52:37):: IPDeviceDetector.run(): joined multicast group
    Line 232 (11:52:39):: DA.processNewDevice: {Device-Revision=1.0.0, Device-Category=other, Device-Make=AMX_Internal, Physical-Device=5001:9:0, objectClass
    Line 233 (11:52:39):: =[Ljava.lang.String;@5c6849, Device-SDKClass=com.amx.duet.devicesdk.IODevice, Bundle-Version=1.0.0, Device-Model=IO_Device, Duet-De
    Line 234 (11:52:39):: vice=41004:1:0, service.id=4, Duet-Module=AMX_IO_Comm_dr1_0_0}
    Line 235 (11:52:43):: Device Access: DeviceAccess.loadDrivers - failed to resolve dependencies for /bundle/AMX_IO_Comm_dr1_0_0
    Line 236 (11:52:43):: DA.processNewDevice: {Device-Revision=1.0.0, Device-Category=other, Device-Make=AMX_Internal, Physical-Device=5001:4:0, objectClass
    Line 237 (11:52:44):: =[Ljava.lang.String;@809ac4, Device-SDKClass=com.amx.duet.devicesdk.RelayDevice, Bundle-Version=1.0.0, Device-Model=RelayDevice, Du
    Line 238 (11:52:44):: et-Device=41005:1:0, service.id=5, Duet-Module=AMX_Relay_Comm_dr1_0_0}
    Line 239 (11:52:44):: Device Access: DeviceAccess.loadDrivers - failed to resolve dependencies for /bundle/AMX_Relay_Comm_dr1_0_0
    Line 240 (11:52:45):: DA.processNewDevice: {Device-Revision=1.0.0, Device-Category=ir, Device-Make=Generic_IR, Physical-Device=5001:5:0, objectClass=[Lja
    Line 241 (11:52:45):: va.lang.String;@30f07c, Device-SDKClass=com.amx.duet.devicesdk.DiscDevice, Bundle-Version=1.0.5, Device-Model=CD, Duet-Device=41006
    Line 242 (11:52:45):: :1:0, service.id=6, Duet-Module=Generic_IR_CD_Comm_dr1_0_0}
    Line 243 (11:52:45):: Device Access: DeviceAccess.loadDrivers - failed to resolve dependencies for /bundle/Generic_IR_CD_Comm_dr1_0_0
    Line 244 (11:52:46):: DA.processNewDevice: {Device-Revision=1.0.0, Device-Category=serial,rs-232, Device-Make=NAD, Physical-Device=5001:1:0, objectClass=
    Line 245 (11:52:46):: [Ljava.lang.String;@fc6dea, Device-SDKClass=com.amx.duet.devicesdk.DiscDevice, Bundle-Version=1.0.0, Device-Model=M5, Duet-Device=4
    Line 246 (11:52:46):: 1007:1:0, service.id=7, Duet-Module=NAD_M5_Comm_dr1_0_0}
    Line 247 (11:52:47):: Device Access: DeviceAccess.loadDrivers - failed to resolve dependencies for /bundle/NAD_M5_Comm_dr1_0_0
  • ericmedleyericmedley Posts: 4,177
    There's no problem having system 0 in the code. The system zero means ," This device is whatever system this program resides. So, if you've set up the master as system 50 the zero means system 50.

    You can put a 1 there as well. I quite often do this when I connect multiple masters on a system. It helps me to keep them straight in the program.

    Perhaps you could post some code from around the button event. We might be able to help then.
  • Thanks for reply, Eric!
    It seems the problem is solved by renewing the firmware : )
  • DiogoDiogo Posts: 65
    We never forget our first program, also our first problem :)
  • Diogo wrote: »
    We never forget our first program, also our first problem :)

    totally :)
  • Hey guys,
    I have another question to you.
    Could anyone explain the IR part of the program? I meen sending IR signals from stored on netlinx IRL files.
    I did it with VisualArchitect for a while, but now I need to make code more effective and clear, so want to write it all by hands.
    For example I have an IRL file on master. How to send the 4st command to IR 3 port?

    ps: also could someone explain me or link to a example how to work with GET comands via rs232 or ethernet. As I understand I need to create some buffer for it? (Need to get projector status)
  • PhreaKPhreaK Posts: 966
    I did it with VisualArchitect for a while, but now I need to make code more effective and clear, so want to write it all by hands.
    Nice one! Committing yourself to learning how to code is one of the best things you could do, not only for yourself but for anyone who happens to work on any systems you build in the future.

    Anyway, in regards to your question about IR. Those little black boxes that AMX make, which are referred to as masters are actually two discrete devices in the one case. You've got the 'master' which is what runs your code and is the brains of the system, and you then have the device controller which has the serial ports, IR ports, IO's etc.

    When you load a *.irl file onto a box it is transferred to one of the IR ports on the device controller. From within your code when you want to call any of the commands from your IR file you need to tell the IR port to actuate the associated channel number. To do this you will need to know two things - the device address of the IR port and the channel number of the command.

    The NetLinx language uses a three part address to identify devices, it takes the form of device:port:system. The device is the number of the umbrella device that contains your desired device - in this case 5001, which is the default number for the device controller in the AMX masters. The port is sort of the sub-device, or the device number within the umbrella device. If you are using the device controller in a NI-X100 IR port 3 will be port 11 of the device controller. And the system number is the the system the device is on, at this point its safest to just use system 0, which means the system this code is running on.

    With that in mind you will be able to declare your device like this
    DEFINE_DEVICE
    dvIRPort = 5001:11:0
    

    When it comes to actuating commands within your IR file at this point the easiest way will be to use the PULSE command. The PULSE command is a reserved NetLinx keyword that will turn on a channel hold it for the currently set pulse time (default of half a second) then turn it off. To use it you need to tell it the device and what the channel you want to pulse. The device will be the IR port we declared above, and the channel will be the slot that the command you want to actuate is sitting in the IR file.
    PULSE[dvIRPort, 4]
    

    If you've got a currently functioning project the easiest way to learn is to open it up and poke around, the help system within NetLinx Studio has heaps of useful info. If there's any keywords etc that look interesting highlighting them and hitting F1 will bring up their help info. If you haven't programmed in other languages before it may be worth asking the google gods for some programming primers to help you get your head around language structure and programming basics.
  • Thank you for message, PhreaK.
    So controller device is automaticly attaching every uploaded .IRL file to a new IR port?

    PULSE[dvIRPort, 4] - meens the IR command nr. 4 should work?

    The VA code is using a duet modules for all i/o controlling. It might be a better way to work, isn't it?

    Found code like that:

    DATA_EVENT[vdvCD1]
    {
    ONLINE:
    {
    SEND_COMMAND vdvCD1, 'PROPERTY-Model,nad 565'
    SEND_COMMAND vdvCD1, DuetPackCmdSimple('LOADPROPERTY','Nad-565-IR.xmd')
    SEND_COMMAND vdvCD1, 'REINIT'
    }
    }

    [....lots of code....]

    BUTTON_EVENT[dvTP_CD1, BTN_PLAY]
    {
    PUSH:
    {
    TO[vdvCD1, PLAY]
    }
    }


    could you explain what code part is missing to make this work?
  • cd6.axi wrote:
    PROGRAM_NAME='CD6'

    DEFINE_DEVICE

    #IF_NOT_DEFINED dvDISCTRANSModule6
    dvDISCTRANSModule6 = 0:0:0
    #END_IF

    #IF_NOT_DEFINED dvDISCModule_CD6
    dvDISCModule_CD6 = 0:0:0
    #END_IF

    DEFINE_CONSTANT

    #IF_NOT_DEFINED DISCTRANS_VERSION
    DISCTRANS_VERSION = '1.0.0'
    #END_IF

    #IF_NOT_DEFINED DISCTRANS_MAX_PROPERTY_ITEMS
    INTEGER DISCTRANS_MAX_PROPERTY_ITEMS = 10
    #END_IF

    #IF_NOT_DEFINED POWER_VERSION
    POWER_VERSION = '1.0.0'
    #END_IF

    #IF_NOT_DEFINED MENU_VERSION
    MENU_VERSION = '1.0.0'
    #END_IF

    #IF_NOT_DEFINED MENU_KEYPAD_MAX_INPUT_LENGTH
    MENU_KEYPAD_MAX_INPUT_LENGTH = 20
    #END_IF

    #IF_NOT_DEFINED DISC_VERSION
    DISC_VERSION = '1.0.0'
    #END_IF

    #IF_NOT_DEFINED DISC_MAX_PROPERTY_ITEMS
    INTEGER DISC_MAX_PROPERTY_ITEMS = 10
    #END_IF

    DEFINE_TYPE

    DEFINE_VARIABLE

    DEFINE_LATCHING

    DEFINE_MUTUALLY_EXCLUSIVE

    DEFINE_START

    DEFINE_EVENT

    DATA_EVENT[vdvCD6]
    {
    ONLINE:
    {
    // Set device model for CD6
    SEND_COMMAND vdvCD6, 'PROPERTY-Model,ps3'

    // Load meta-data for CD6
    SEND_COMMAND vdvCD6, DuetPackCmdSimple('LOADPROPERTY','sony playstation-ps3-IR.xmd')

    // Reinitialize the module
    SEND_COMMAND vdvCD6, 'REINIT'
    }
    }

    BUTTON_EVENT[dvTP_CD6, 568]
    {
    PUSH:
    {
    // Pause
    TO[vdvCD6, PAUSE]
    }
    }


    DEFINE_PROGRAM

    Is it ok? Nothing is missed and nothing needless?
Sign In or Register to comment.