Problem on RS232 with Lumens PS400 (beginner)
hiroking
Posts: 11
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.
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.
0
Comments
--John
--John
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.
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= =
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?
- 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.
I try it, it work, thank you so much...
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!!!
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"
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.....
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 = =
If not, that is probably what the deal is.
It's in the manual under 1.3 DME Setting
Thanks!