Home AMX User Forum NetLinx Studio

Data Received YES and Data Transmitted NO?

I gave this a try on the AMX TP Emulator and was getting the "Data Received" but nothing is showing up in the "Data Transmitted"? What am I missing here?
DEFINE_DEVICE

dvPROJECTOR  = 8003:1:0
dvTP	                 = 8001:1:0
---------------------------------------------------------------------------------------------------------------------
DEFINE_CONSTANT

INTEGER proj_ON   = 1
INTEGER proj_OFF  = 0
---------------------------------------------------------------------------------------------------------------------
DEFINE_VARIABLE

INTEGER nProj_PWR				//TRACK PROJECTOR STATUS
---------------------------------------------------------------------------------------------------------------------
DEFINE_MUTUALLY_EXCLUSIVE

DEFINE_FUNCTION ProjPwrOn()
{
	PULSE[dvPROJECTOR,1]
	WAIT 20
	{
	nProj_PWR = Proj_On
	}
}
DEFINE_FUNCTION ProjPwrOff()
{
	PULSE[dvPROJECTOR,1]
	WAIT 20
	{
	nProj_PWR = Proj_Off
	}
}
----------------------------------------------------------------------------------------------------------------------
DEFINE_EVENT

BUTTON_EVENT[dvTP,1]	//TOGGLE PROJECTOR POWER ON/OFF
{
	PUSH:
	{
		IF(nProj_PWR = proj_OFF)
		{
		projPwrOn()
		SEND_STRING dvPROJECTOR, "'PON'"
		}	
		ELSE
		{
		ProjPwrOff()
		SEND_STRING dvPROJECTOR, "'POF'"
		}
	}
}
---------------------------------------------------------------------------------------------------------------------
DEFINE_PROGRAM

[dvTP,1] 				= (nProj_PWR = proj_ON)

Comments

  • nvm, self-fixed. I left out the prefix >> for the command.
  • ericmedleyericmedley Posts: 4,177
    playskool1 wrote: »
    nvm, self-fixed. I left out the prefix >> for the command.

    I hate when that happens..
    :D
  • jjamesjjames Posts: 2,908
    I'm assuming this is for the practical?

    I'd love to re-do it just to see what kind of a difference 4 years can make.
Sign In or Register to comment.