Home AMX User Forum NetLinx Studio
Options

variable text on Modero

Hi all
I have a NXD-700VI that I what to send a variable text command to. The text is the result of 'what channel' is the user watching. The call I have for removing this info from the device is working fine but I can't seem to get it to display properly.

example of what I have.
- ACTIVE (FIND_STRING (DATA.TEXT, 'TVC', 1)):
{
TUNER_JUNK=REMOVE_STRING (DATA.TEXT, 'TVC', 1)
TUNER_CH=MID_STRING(DATA.TEXT, 1, 3)
send_command vtp,"'text12-channel','-',itoa("tuner_ch")"

Comments

  • Options
    Joe HebertJoe Hebert Posts: 2,159
    send_command vtp,"'text12-channel','-',itoa("tuner_ch")"
    You don't want to use ITOA() because tuner_ch is already a string and not an integer.
    Try this and you should get to where you want to go.:
    send_command vtp,"'text12-channel-',tuner_ch"
  • Options
    AMXJeffAMXJeff Posts: 450
    I am assuming the protocol string looks like this, correct me if it wrong..

    DATA.TEXT = 'TVC099'
    DEFINE_VARIABLE
    CHAR TUNER_CH[3]
    ...
    ACTIVE (FIND_STRING (DATA.TEXT, 'TVC', 1)):
    { 
    	REMOVE_STRING (DATA.TEXT, 'TVC', 1)
    	
    	// FIND THE FIRST INSTANCE OF ASCII NUMERICS
    	TUNER_CH = ITOA(ATOI(DATA.TEXT));
    
    	// SEND COMMAND TEND TO BE CASE SENSITIVE, MAKE SURE YOU USE ALL CAPS FOR 'TEXT12'
    	SEND_COMMAND vTP,"'TEXT12-channel','-',TUNER_CH";
    }
    



    Hi all
    I have a NXD-700VI that I what to send a variable text command to. The text is the result of 'what channel' is the user watching. The call I have for removing this info from the device is working fine but I can't seem to get it to display properly.

    example of what I have.
    - ACTIVE (FIND_STRING (DATA.TEXT, 'TVC', 1)):
    {
    TUNER_JUNK=REMOVE_STRING (DATA.TEXT, 'TVC', 1)
    TUNER_CH=MID_STRING(DATA.TEXT, 1, 3)
    send_command vtp,"'text12-channel','-',itoa("tuner_ch")"
  • Options
    Thomas HayesThomas Hayes Posts: 1,164
    Thanks Joe, worked fine, I had just done a cut and paste from another part of the program and and over looked that ITOA command.
Sign In or Register to comment.