Home AMX User Forum NetLinx Modules & Duet Modules

Pioneer_PRO1130 module

I really need some help with this module. I loaded the module and it works fine, But when I incorporate the module into my program I can't find the right way to send commands as part of a macro. The module has differents module according to the type of functions for example the Power module states this:
								dev vdvDev,
								dev dvTP,
								integer nButtons[]  


button_event[dvTP, nButtons]
		stack_var integer nBtn
		nBtn = get_last(nButtons)
		switch (nBtn)
			case 1 :	// Set Power
				[vdvDev, POWER_ON] = ![vdvDev, POWER_ON]
			case 2 :	// Cycle Power
				pulse[vdvDev, POWER]
			case 3 :	// Set Power On
				pulse[vdvDev, PWR_ON]
			case 4 :	// Set Power Off
				pulse[vdvDev, PWR_OFF]

Then in the source we have:
dvTV  = 5001:1:0
vdvTV = 41001:1:0
dvTP = 10001:40:0


dev vdvTVArray[] =

#include 'DisplayComponent.axi'
#include 'MenuComponent.axi'
#include 'ModuleComponent.axi'
#include 'PowerComponent.axi'
#include 'SourceSelectComponent.axi'
#include 'TunerStationComponent.axi'
#include 'TVComponent.axi'
#include 'VolumeComponent.axi'

define_module 'DisplayComponent' mDispCmp1(vdvTV, dvTP, nDisplayButtons, nDisplayVTButtons, nDisplayLevels)
define_module 'MenuComponent' mMenuCmp1(vdvTV, dvTP, nMenuButtons)
define_module 'ModuleComponent' mMdlCmp1(vdvTV, dvTP, nModuleButtons, nModuleVTButtons)
define_module 'PowerComponent' mPwrCmp1(vdvTV, dvTP, nPowerButtons)
define_module 'SourceSelectComponent' mSrcSelCmp1(vdvTVArray,
define_module 'TunerStationComponent' mTnrStnCmp1(vdvTVArray,
define_module 'TVComponent' mTVCmp1()
define_module 'VolumeComponent' mVolCmp1(vdvTVArray, dvTP, nVolBtns, nVolLevels, nVolOutBtns, nVolPresetBtns, nVolLvlStore, nVolPsetStore,nVolFBBtns)

define_module 'Pioneer_PRO1130_Comm_dr1_0_0' mTVDev1(vdvTV, dvTV)

When I tried to send as part of a macro, a Power Off command like this:
send_command vdvTV, 'PWR_OFF'

It compiles OK but the display doesn't respond. When I tried to send something like this:
pulse [vdvTV,PWR_OFF]  

then PWR_OFF is not recognized. I'm assumming that vdvDEV is a virtual deviced used by the duet module because it is not define in the main source. Any suggestions? This thing is driving me nuts


  • The definition for PWR_OFF should be in the SNAPI.AXI file. Maybe you have an old copy?

    Anyway, I usually throw away all of the various modules and only use the main one which is:
    define_module 'Pioneer_PRO1130_Comm_dr1_0_0' mTVDev1(vdvTV, dvTV)

    In the module that we don't get the source code, instead of a PROGRAM= line there will be a line that looks like this:
    MODULE_NAME='Pioneer_PRO1130_Comm_dr1_0_0'(vdvDEV, dvDEV)

    When you use the Define_module line, you are passing the values of your vdvTV and dvTV declarations to the module.

    If you look in the SNAPI.AXI file under the definitions for the TV, you will see where they have set PWR_OFF to = channel 28. (Line 2228 in the SNAPI.AXI that I have).

    There are two reasons that
    send_command vdvTV, 'PWR_OFF'
    did not work.

    PWR_OFF is in quotes, so it is a literal. Duet modules generally accept commands, or channel events. Unfortunately, PWR_OFF is not one of the commands that it recognizes. If you look in the document that comes with the module, these channels and commands are listed. So SEND_COMMAND vdvTV,'?INPUT' is a valid command that the module would respond to.

    If you had the SNAPI.AXI file included, your line:
    pulse [vdvTV,PWR_OFF]
    should have worked. It would be the same as: pulse [vdvTV,28]

    Like I said, I usually throw out all of the support modules and include files and just use the main device module and do the pulses, on/off, and send_commands myself.
  • flcusatflcusat Posts: 309
    The definition for PWR_OFF should be in the SNAPI.AXI file. Maybe you have an old copy?

    Danny, You are absolutely right. I don't have a SNAPI.AXI file. I just downloaded the module again from the partner site and doesn't show that file either.
  • flcusatflcusat Posts: 309
    I just check all the possible modules in the partners site. There are only two for Pioneer plasmas, the before mentioned 1130 that doesn't have the SNAPI.AXi file and a Hitachi. The commands in the Hitachi are different than the 1130.
  • On the web site, go to Applications Files, NetLinx Design Tools, and it is listed as SNAPI 1.8.

    I saved mine in /program files/common files/amxshare/axis

    That way NetLinx Studio always finds it.
  • flcusatflcusat Posts: 309
    On the web site, go to Applications Files, NetLinx Design Tools, and it is listed as SNAPI 1.8.

    I saved mine in /program files/common files/amxshare/axis

    That way NetLinx Studio always finds it.

    I got it now Danny. Thanks. So this SNAPI.AXI file is common to all the DUET modules and should be included in all the programs where a DUET module is used, right?
  • DarksideDarkside Posts: 345

    There is a help topic in studio on SNAPI.

    This extracted from the help file fyi.


    SNAPI.axi is an include file that defines constants for each channel and level defined by SNAPI. These constants can be used in your programs in place of channel and level numbers. The constant names are listed in this document alongside every SNAPI function assigned to a channel or level.

    SNAPI.axi is located in C:\Program Files\Common Files\AMXShare\AXIs. The file is organized by device type and lists all the standard channels and levels that may be supported by the module. This list does not contain all the channel or levels supported by a module and may include channels and levels not supported by a device. See the specific module documentation for a complete list of channels and levels supported by the module.

    To include SNAPI.axi in your program, simply add an #INCLUDE statement for it:

    #INCLUDE 'SNAPI.axi'

    The file does not need to be copied to your project directory. The NetLinx compiler will be able to find this file automatically and include it in your program.
  • flcusatflcusat Posts: 309
    Thanks Stephen.
Sign In or Register to comment.