Home AMX User Forum NetLinx Studio

strings sent to 0:2:0 doesn't get sent

the ip_client_open was successful. at least, if I try to send some strings and it's not open, there will be an error message, right?

one strange thing is that when I restart the master, everything is sent at once. I'm using a programmer2 exam emulator, and see the lighting part just ramps up everytime i did a reboot. what am I doing wrong? is it a program fault or do I have to set something first?

the program is simple. ip_client_open on define_start and this button event below:
button_event[dvTP_DIMMER,nBtnLightRaise]
{
    push:
    {
	send_string dvLight,"'RAISEDIM,[1:',itoa(get_last(nBtnLightRaise)),']'"
    }
    release:
    {
	send_string dvLight,"'STOPDIM,[1:',itoa(get_last(nBtnLightRaise)),']'"
    }
}


any clues?

Comments

  • Spire_JeffSpire_Jeff Posts: 1,917
    I am just guessing, but is there a chance that the connection closes after receiving a message? Try this logic:
    data_event[dvLight]{
        offline:{
           fnReconnect();
        }
        onerror:{
           send_string 0,"'Error connecting to dvLight'";
           fnReconnect();
        }
    }
    

    fnReconnect() should be smart enough to only try connecting every so often and not flood the network :)

    Jeff
  • PhreaKPhreaK Posts: 966
    I had always been told that port 2 was reserved and 0:3:0 was the first available port for use by us meer humans.
  • mpullinmpullin Posts: 949
    Also note that you will not see strings going to/from to any Ethernet port (0:x:0) in Notifications. This is a shortcoming of NetLinx Studio and the strings are actually being sent, you just won't be able to see them unless you trap for them in a string event or something.
  • i only have ip_client_open on offline. the master is a java app running on a pc (the amx p2 emulator), and it receives everything only on master reboots. it accepts things i sent through telnet. is there something i should set first?

    tried using 0:3:0, 0:4:0, nothing changes.
  • ericmedleyericmedley Posts: 4,177
    i only have ip_client_open on offline. the master is a java app running on a pc (the amx p2 emulator), and it receives everything only on master reboots. it accepts things i sent through telnet. is there something i should set first?

    tried using 0:3:0, 0:4:0, nothing changes.

    I didn't know we could have the java app??? I must not have gotten the memo...
  • viningvining Posts: 4,368
    yan_benyamin wrote:
    I'm using a programmer2 exam emulator,
    The released the emulator? So if you did your P2 practical when they said it had to be done by you had to do it blind but if you didn't do it you when you were supposed to you get an entire new year to complete it and you get an emulator to boot. That seems fair. :) So much for the AMX's hard & fair line on recertifications.

    The code looks a little too familiar to be the P2 course practical.

    Such is life I guess!
  • i should've gotten my result back in november but they sent it back to me late last month. I guess that's why they sent me the emulator to test it for.
  • Joe HebertJoe Hebert Posts: 2,159
    PhreaK wrote: »
    I had always been told that port 2 was reserved and 0:3:0 was the first available port for use by us meer humans.
    I think you may have been told wrong. AFAIK, port 2 is not reserved.

    As per Netlinx.axi

    INTEGER FIRST_LOCAL_PORT = 2;
  • ericmedleyericmedley Posts: 4,177
    Joe Hebert wrote: »
    I think you may have been told wrong. AFAIK, port 2 is not reserved.

    As per Netlinx.axi

    INTEGER FIRST_LOCAL_PORT = 2;

    While this may be true, I was told (and checked my original class notes to be sure) to stay off port 2 and start working at port 3 and above.
  • Yeah, I was told that port 2 is reserved for future use. They told me in training that it will work fine for now but may not work in the future if AMX decides to make use of it.
  • ericmedleyericmedley Posts: 4,177
    remeolb wrote: »
    Yeah, I was told that port 2 is reserved for future use. They told me in training that it will work fine for now but may not work in the future if AMX decides to make use of it.

    eminent domain and all that...
Sign In or Register to comment.