Home AMX User Forum AMX General Discussion

Having problem with converted Axcess code to Netlinx code

Hi All,

I have converted axcess code to Netlinx code. It compiles as Netlinx fine. But when I connect my codec to a Panel and a controller i am getting Error Messgae: TImed Out from Codec:

This is totally new to me. I just started learning this amx stuff.

Any help would be great.

Thanks

Comments

  • newtoamx wrote:
    Hi All,

    I have converted axcess code to Netlinx code. It compiles as Netlinx fine. But when I connect my codec to a Panel and a controller i am getting Error Messgae: TImed Out from Codec:

    This is totally new to me. I just started learning this amx stuff.

    Any help would be great.

    Thanks

    This is not a typical NetLinx debug message, so it seems to be generated by the program.

    When converting AXcess to NetLinx code, the 2 most common things have to be modified:
    1) device addressing
    2) Setting the baudrates should be done in the ONLINE handler of a DATA_EVENT instead of doing this in DEFINE_START.

    But both depends on how you have changed the hardware setup.
  • NMarkRobertsNMarkRoberts Posts: 455
    Please post the code

    Hi New,

    How about if you post the code and some details about what is connected to what?
  • My codec(Tandberg 6000) is connected to NI-700 thru RS323 port on both end and AMX panel is connected to NI-700 's Axlink port.

    Some of my code looks like this

    DEFINE_DEVICE

    CODEC = 1:1:0
    ROOMCNTL =2:1:0
    PANEL = 128:1:0
    PANEL2= 129:1:0
    PANEL3= 130:1:0

    (***********************************************************)
    (* STARTUP CODE GOES BELOW *)
    (***********************************************************)
    DEFINE_START (*OK3.0*)

    SEND_COMMAND CODEC, 'SET BAUD 4800,N,8,1 485 DISABLE' (*3.1F*)
    SEND_COMMAND CODEC, 'HSON'
    SEND_COMMAND CODEC, 'RXON'
    SEND_COMMAND ROOMCNTL, 'SET BAUD 9600,N,8,1 485 DISABLE'
    #WARN 'CHANGE ROOM CONTROLLER SPEED SETTING HERE!' (* 3_1B!! *)
    SEND_COMMAND ROOMCNTL, 'RXON'
    (*SEND_COMMAND 3, 'SET BAUD 9600,N,8,1 485 DISABLE' (*FOR TEST PURPOSES*)
    SEND_COMMAND 3, 'HSON'
    *)
    SEND_BUF=''
    SEND_FLAG=0
    TIMEOUT=0
    SEND_GO=1

    RECEIVE_BUF =''
    CODEC_BUF =''
    CREATE_BUFFER CODEC, CODEC_BUF
    ____________

    Also when i connect to Netlinx studio It shows the panel are connected but i don't see my codec connection at all. So what do you think the problem is?

    Thanks for the help
  • cwpartridgecwpartridge Posts: 120
    What is the device number you assigned to the NI-700 device? It is usually 5001, but can be anything. You have defined it to be 1 (CODEC = 1:1:0) but unless you set the NI device to 1, it will not respond to your code.
  • The common device address for the NI-700's COM port is
    // control ports are on hardware address 5001
    SER1 = 5001:1:0 // first COM port is Port 1 on the hardware
    SER2 = 5001:2:0 // second COM port is Port 2 on the hardware
    
    As I wrote in my previous reply, defining the COM port setting should not be done in the DEFINE_START section in NetLinx.
    DEFINE_DEVICE
    CODEC = 5001:1:0
    
    DEFINE_EVENT
    DATA_EVENT[CODEC]
    {
    ONLINE: // if com port firmware is ready to operate
    {
      // add the comm parameter commands here
    }
    }
    

    Just a hint:
    If you do a CREATE_BUFFER, the RXON is set automatically.
  • What is the device number you assigned to the NI-700 device? It is usually 5001, but can be anything. You have defined it to be 1 (CODEC = 1:1:0) but unless you set the NI device to 1, it will not respond to your code.
    Ups, too slow in my response.... :rolleyes:
    ...but maybe more detailed :D
  • NMarkRobertsNMarkRoberts Posts: 455
    I have a Tandberg codec attached to an NI700 sitting on my desk right in front of me as I type and I very recently got it working perfectly.

    However I did not convert the code from Axcess, I wrote NetLinx code, using a comms engine refined over the last 5 years.

    Here is the startup code I use, which differs from yours; I use the data_event.

    send_command dDevice,'SET BAUD 9600, N, 8, 1 485 DISABLE'
    send_command dDevice,'HSOFF'
    send_command dDevice,'XOFF'

    Do you send carriage returns on the end of your commands?

    Have you tried connecting direct from your PC serial port?

    Have you checked the device number?

    If it still doesn't work feel free to private message me or Skype me (check timezones first please!) and we will sort it out together.

    Be aware that the Tandberg spews masses of stuff at you if you turn on all of the options so the odd message you mention is no surprise.
  • NI700 device missing!

    New has sent me a show device from his NI700 and here it is, followed by the same from my good NI700. Can anyone shed any light on why the NI700 device is missing?

    FAULTY NI700

    00000 (00298)NI Master (00001)AMX Corp. 00341 v2.95.214
    (PID=0:OID=0) Serial='210503xp0350099',0
    Physical Address=IP 10.0.0.133
    (00298)vxWorks Image (00001) 00339 v2.95.214
    (PID=0:OID=1) Serial=N/A
    (00298)BootROM (00001) 00340 v2.95.214
    (PID=0:OID=2) Serial=N/A
    (00256)AXLink I/F uContr(00001) 00270 v2.01.124
    (PID=0:OID=3) Serial=0000000000000000
    00128 (00188)COLOR LCD TOUCH PAN(00001)AMX Corp. 00002 v3.19e

    GOOD NI700

    00000 (00298)NI Master (00001)AMX Corp. 00341 v2.96.218
    (PID=0:OID=0) Serial='210503p3540643',0,0
    Physical Address=IP 192.168.0.100
    (00256)AXLink I/F uContr(00001) 00270 v2.12.140
    (PID=0:OID=3) Serial=0000000000000000
    05001 (00286)NI-700 (00001)AMX Corp. 00346 v1.12.140
    (PID=0:OID=0) Serial='N/A',0,0,0,0,0,0,0,0,0,
    Physical Address=Internal Connection
  • DHawthorneDHawthorne Posts: 4,584
    I find it interesting that your "bad" NI shows a VxWorks rev. number and and Axlink buss, but not the NI firmware revision. The first thing I would do is to try re-loading the firmware (not only the master firmware, but the firmware for the NI itself; they are seperate things). If it didn't show the Axlink, I would have said right off the bat you have a bad chassis, but that it exists sheds some doubt in my mind on that.
  • What is VXworks image? Should i load first the NI-700 firmaware or Master firmware?

    Thanks for the help
  • DHawthorneDHawthorne Posts: 4,584
    newtoamx wrote:
    What is VXworks image? Should i load first the NI-700 firmaware or Master firmware?

    Thanks for the help
    VXWorks is part of the master firmware. It runs the web server, etc. You need to load the NI-700 firmware. It can't hurt to load both, but your problem seems to be in the NI, not the master.
  • NI-700 Show device

    Below is show device from Ni-700

    Does this look good?


    Device (ID)Model (ID)Mfg FWID Version
    00000 (00298)NI Master (00001)AMX Corp. 00341 v2.95.214
    (PID=0:OID=0) Serial='210503xp0350099',0
    Physical Address=IP
    (00298)vxWorks Image (00001) 00339 v2.95.214
    (PID=0:OID=1) Serial=N/A
    (00298)BootROM (00001) 00340 v2.95.214
    (PID=0:OID=2) Serial=N/A
    (00256)AXLink I/F uContr(00001) 00270 v2.01.124
    (PID=0:OID=3) Serial=0000000000000000
    00128 (00188)COLOR LCD TOUCH PAN(00001)AMX Corp. 00002 v3.19e
    (PID=0:OID=0) Serial=0000000000000000
    Physical Address=Axlink
    00129 (00188)COLOR LCD TOUCH PAN(00001)AMX Corp. 00002 v3.19e
    (PID=0:OID=0) Serial=0000000000000000
    Physical Address=Axlink
    05001 (00286)NI-700 (00001)AMX Corp. 00346 v1.01.124
    (PID=0:OID=0) Serial='N/A',0,0,0,0,0,0,0,0,0,
    Physical Address=Internal Connection
  • Yes

    Device 5001 has appeared. You should now find that your code cans end strings through the serial port - watch for a red led flash on the front of the controller. If the codec is responding you will see an answering yellow led flash.
  • Still same error message. When i use the touch panel i see front lights on NI-700 blinks.



    Thanks,
  • Update the firmware
    New has sent me a show device from his NI700 and here it is, followed by the same from my good NI700. Can anyone shed any light on why the NI700 device is missing?

    FAULTY NI700
    00000 (00298)NI Master (00001)AMX Corp. 00341 v2.95.214

    GOOD NI700
    00000 (00298)NI Master (00001)AMX Corp. 00341 v2.96.218

    Looks like old firmware in the faulty NI-700.
Sign In or Register to comment.