Home AMX User Forum NetLinx Studio
Options

Problem on RS232 with Lumens PS400 (beginner)

I am a beginner, and face a lot of problem on controlling the device with RS-232.
For test to control with following equipment
Controller: NI-3100
Equipment: Lumens PS400 Visualizer control with RS232 port
My test program is:

DEFINE_DEVICE
dvVisual = 32001:4:1 // Visualizer (232 Ctrl)

DATA_EVENT[dvVisual]
{ ONLINE: { SEND_COMMAND dvVisual,"'SET BAUD 9600,N,8,1 485 DISABLE'" } }

BUTTON_EVENT[dv7500,891]
BUTTON_EVENT[dv7500,892]
{
PUSH:
{
SWITCH(BUTTON.INPUT.CHANNEL)
{
CASE 891:
{
SEND_STRING dvVisual, "$A0,$B1,$01,$00,$00,$AF" // Power ON
}
CASE 892:
{
SEND_STRING dvVisual, "$A0,$B1,$00,$00,$00,$AF" // Power OFF
}
}
}
}

I checked the RS-232 cable and connections with no problem, but the equipment is no response at all,
would anyone please take a look and tell me why I can't control it.

Thanks a lot.

Comments

  • Options
    Joe HebertJoe Hebert Posts: 2,159
    hiroking wrote:
    I am a beginner, and face a lot of problem on controlling the device with RS-232.
    For test to control with following equipment
    Controller: NI-3100
    Equipment: Lumens PS400 Visualizer control with RS232 port
    My test program is:

    DEFINE_DEVICE
    dvVisual = 32001:4:1 // Visualizer (232 Ctrl)
    dvVisual needs to be a real device number. If you are using an NI-3100 then the first RS-232 port is 5001:1:0, the second RS-232 port is 5001:2:0, and so on.
  • Options
    And also, maybe it's just not listed in the test program you posted, but there's no device definition for dv7500.

    --John
  • Options
    Incidentally, I've seen some masters come from the factory with a device number of 32001.

    --John
  • Options
    Sorry! I just cut some lines in my test program, the device I used should as follows:

    DEFINE_DEVICE
    dv7500 = 10001:1:1 // Touch Panel
    dvTape1 = 32001:1:1 // TAPE 1(232 Ctl)
    dvTape2 = 32001:2:1 // TAPE 2 (232 Ctl)
    dvSVHS = 32001:3:1 // SVHS (232 Ctl)
    dvVisual = 32001:4:1 // Visualizer (232 Ctrl)
    dvYAMAHA = 32001:5:1 // YAMAHA (232 Ctl)
    dvAVsw = 32001:6:1 // AV Switcher (232 Ctrl)
    dvProj = 32001:7:1 // Projector (232 Ctrl)
    dvRelay = 32001:8:1 // Relay
    dvMD = 32001:9:1 // MD(Ir 1)
    dvDVD = 32001:10:1 // DVD (Ir 2)
  • Options
    ericmedleyericmedley Posts: 4,177
    hiroking wrote: »
    Sorry! I just cut some lines in my test program, the device I used should as follows:

    DEFINE_DEVICE
    dv7500 = 10001:1:1 // Touch Panel
    dvTape1 = 32001:1:1 // TAPE 1(232 Ctl)
    dvTape2 = 32001:2:1 // TAPE 2 (232 Ctl)
    dvSVHS = 32001:3:1 // SVHS (232 Ctl)
    dvVisual = 32001:4:1 // Visualizer (232 Ctrl)
    dvYAMAHA = 32001:5:1 // YAMAHA (232 Ctl)
    dvAVsw = 32001:6:1 // AV Switcher (232 Ctrl)
    dvProj = 32001:7:1 // Projector (232 Ctrl)
    dvRelay = 32001:8:1 // Relay
    dvMD = 32001:9:1 // MD(Ir 1)
    dvDVD = 32001:10:1 // DVD (Ir 2)

    I wouldn't use those device number (32001:etc...) Those are in the virtual device range and 32001 is quite often taken by the master.

    Typically an NI-X100 or whatever's device is 5001:etc... by default.
  • Options
    Thanks for reply^.^
    I change NI-3100 from 32001 to 5001....
    But the main problem is that I can't control the visualizer by RS-232 even I change 5001...
    The method i used to program the RS-232 in wrong way or not??
    Are there any other ways to write the program to control RS232?
    Please give me some advice ...cos this is my first program.
    I can control the cassette or svhs players easily with simple command SEND_STRING,
    but for the equipment of audio mixer and visualizer.....I can't= =
  • Options
    AMXJeffAMXJeff Posts: 450
    hiroking wrote: »
    But the main problem is that I can't control the visualizer by RS-232 even I change 5001...

    Are you sending the STX? and Waiting for the ACK Prior to Sending the string?

    // Send this first
    SEND_STRING dvRS232,"$73"

    you must wait for "$AA" to come back from the device. Then you send your "$A0,$B1,$01,$00,$00,$AF" and then you have to wait for the response to that command before you send another. So a queue is needed...
  • Options
    AMXJeff wrote: »
    Are you sending the STX? and Waiting for the ACK Prior to Sending the string?

    // Send this first
    SEND_STRING dvRS232,"$73"

    you must wait for "$AA" to come back from the device. Then you send your "$A0,$B1,$01,$00,$00,$AF" and then you have to wait for the response to that command before you send another. So a queue is needed...

    Thanks Jeff
    I will try it next Monday.

    In Protocol Manual, it mentioned that
    "STX= 73H (?s?) ACK= AAH
    PC request to send command by sending STX to MASTER.
    If MASTER is ready for receiving, send ACK to PC.
    When PC sends 6 bytes to MASTER, it must delay 0.1ms among bytes."

    How can do that?
    Should i use "SEND_COMMAND dvRS232,"'CHARD-1'" first?
  • Options
    AMXJeffAMXJeff Posts: 450
    I think the current char delay is satifactory, only change it if it needs it...
  • Options
    Odd. I've never seen a master at anything but device 0! :)

    - Chip

    Incidentally, I've seen some masters come from the factory with a device number of 32001.

    --John
  • Options
    ericmedleyericmedley Posts: 4,177
    Chip Moody wrote: »
    Odd. I've never seen a master at anything but device 0! :)

    - Chip

    To be more specific: Yes, the master takes device 0 but the program creates a few virtual devices of its own to use. 'NSX Application' shows up as device 32001 in one of my device trees.
  • Options
    DHawthorneDHawthorne Posts: 4,584
    Devices 32001 to 32999 are automatically assigned device numbers. If, for whatever reason, the controller chassis device number got reset, this is just what the master assigned it. I have had this happen once or twice to a working system after a messy power issue; it's rare, but it happens. It could also be the controller in question came without an assigned device number in the first place instead of the default 5001. IRS4 and COM2 boxes come that way by default.
  • Options
    AMXJeff wrote: »
    I think the current char delay is satifactory, only change it if it needs it...

    I try it, it work, thank you so much...
  • Options
    Second problem, also using RS-232......
    Controller: NI-3100, RS-232 port 5,
    Equipment: Yamaha DME24N with RS232 port
    I just test to change the scene of Yamaha, so my test program is:

    DEFINE_DEVICE
    dvYamaha = 5001:5:1 // Yamaha (232 Ctrl)

    DATA_EVENT[dvYamaha]
    {
    ONLINE:
    {
    SEND_COMMAND dvYamaha,"'SET BAUD 38400,N,8,1 485 DISABLE'"
    }
    }

    BUTTON_EVENT[dv7500,881]
    BUTTON_EVENT[dv7500,882]
    {
    PUSH:
    {
    SWITCH(BUTTON.INPUT.CHANNEL)
    {
    CASE 881:
    {
    SEND_STRING dvYamaha, "$52,$53,$43,$20,$30,$20,$31,$0A" //Change Scene 1
    }
    CASE 882:
    {
    SEND_STRING dvYamaha, "$52,$53,$43,$20,$30,$20,$32,$0A" //Change Scene 2
    }
    }
    }
    }

    After I test it... Yamaha have no response at all, I don't know why? Is the method I used wrong?
    I have already downloaded the duet module of Yamaha DME24N from AMX website, but the method
    shown on module is very difficult to understand as I am in beginner level on programming~~~~

    I attached the protocol manual here.....hope anyone can help me.....thanks!!!
  • Options
    AMXJeffAMXJeff Posts: 450
    hiroking wrote: »
    After I test it... Yamaha have no response at all, I don't know why?

    It looks to me that the unit may require hardware handshaking...according to the RS232 wiring diagram found in the manual.

    I would wire the cable this way and turn Hardware Handshaking on...

    // Cable Wiriing
    AMX / Yamaha
    2 / 3
    3 / 2
    5 / 5
    7 / 8
    8 / 7
    / 4 jump to 6 on yamaha side only

    DATA_EVENT[dvYamaha]
    {
    online:
    {
    SEND_COMMAND dvYamaha,"'SET BAUD 38400,N,8,1 485 DISABLE'"
    SEND_COMMAND dvYamaha,"'HSON'"
    }
    }

    // I do not know why you choose to take the time to figure out the hex value of all the ascii values in the protocol. It is easier to just use the ascii characaters.

    // Recall Scene 1
    SEND_STRING dvYamaha,"'RSC 0 1',13"
  • Options
    Thanks a lot Jeff, I will try it tomorrow and let you know the result..
  • Options
    AMXJeff wrote: »
    It looks to me that the unit may require hardware handshaking...according to the RS232 wiring diagram found in the manual.

    I would wire the cable this way and turn Hardware Handshaking on...

    // Cable Wiriing
    AMX / Yamaha
    2 / 3
    3 / 2
    5 / 5
    7 / 8
    8 / 7
    / 4 jump to 6 on yamaha side only

    I found in manual that pin 4-6 and pin 7-8 of RS-232 of Yamaha is short internally...
    And at the manual of AMX Duet Module Interface Specification for DME Series Audio Processor,
    Also the cable wiring just use pin 2, 3, 5... so that I use this setting before....
    After test in both cable setting( use 2,3,5 and use 2,3,5,7,8), the result is same:
    When press the button on panel, port 5 TX LED at AMX panel lits but Yamaha is no response at all.....
  • Options
    AMXJeff wrote: »
    // Recall Scene 1
    SEND_STRING dvYamaha,"'RSC 0 1',13"

    At Manual, Basic Command Specifications
    A command type transmitted between DME-N and Remote Controller should be the following:

    <Command name><Option 1><Option 2>...<Option n><Line feed>
    -LF (0 x 0A) will be needed at the end of a command as a line feed code.

    Then the program code should be as follows???
    SEND_STRING dvTamaha,"'RSC 0 1',10" //10 stand for line feed??

    I try this code also......Yamaha still no response = =
  • Options
    Under the Utility page on the DME under the Misc tab, did you tell the Remote to be Rmt ctrl :232c?

    If not, that is probably what the deal is.

    It's in the manual under 1.3 DME Setting
  • Options
    matt95gsrmatt95gsr Posts: 165
    Did you ever establish communication with the DME24N? I am working with one as well, and was unable to communicate with it today. I changed the settings in the DME to allow RS232 per the manual instructions, but was unable to get any response from the unit. Tried with control system and my laptop via hyperterminal, with multiple pinouts, and every baud rate from 9600 to 115.2k, even thought the manual states 38400. Anyone else have any insight into working with this thing?
    Thanks!
Sign In or Register to comment.