Raritan PX2 PDU(Help!)
edwinpang47
Junior Member
Hi All,
Currently I am tried using AMX NI3100 via LAN control the raritan px2 PDU power sequence. But it is not work. Below is my program coding:
DEFINE_CALL 'Power Up'
{
IP_CLIENT_OPEN(3,'146.40.31.16',23,1)
IP_CLIENT_OPEN(4,'146.40.31.17',23,1)
WAIT 20
{
SEND_STRING dvAPC1, "'admin',$0D"
SEND_STRING dvAPC2, "'admin',$0D"
WAIT 10{
SEND_STRING dvraritan1, "'admin',$0D"
SEND_STRING dvraritan2, "'admin',$0D"
}
WAIT 20{
SEND_STRING dvraritan1, "'power',$0D"
SEND_STRING dvraritan2, "'power',$0D"
}
WAIT 25{
SEND_STRING dvraritan1, "'outlets 3-20 on /y',$0D"
SEND_STRING dvraritan2, "'outlets 4-8,10-20 on /y',$0D"
}
WAIT 30{
SEND_STRING dvraritan1, "'exit',$0D"
SEND_STRING dvraritan2, "'exit',$0D"
}
WAIT 35
{
IP_CLIENT_CLOSE(3)
IP_CLIENT_CLOSE(4)
}
}
}
//End Coding
Below is the error I get from diagnostics bar:
Line 12356 (11:09:58):: ClientOpen mxInetAddr or hostGetNyName error 0x0
Line 12357 (11:09:58):: CIpEvent::OnError 0:2:1
Line 12358 (11:09:58):: CIpLibrary::Hextoi - Error
Line 12359 (11:09:59):: UNKNOWN HOST:
Line 12360 (11:09:59):: ClientOpen mxInetAddr or hostGetNyName error 0x0
Line 12361 (11:09:59):: CIpEvent::OnError 0:2:1
Line 12362 (11:09:59):: UNKNOWN HOST:
Can anyone give me some advice on this ?
Thank You
Currently I am tried using AMX NI3100 via LAN control the raritan px2 PDU power sequence. But it is not work. Below is my program coding:
DEFINE_CALL 'Power Up'
{
IP_CLIENT_OPEN(3,'146.40.31.16',23,1)
IP_CLIENT_OPEN(4,'146.40.31.17',23,1)
WAIT 20
{
SEND_STRING dvAPC1, "'admin',$0D"
SEND_STRING dvAPC2, "'admin',$0D"
WAIT 10{
SEND_STRING dvraritan1, "'admin',$0D"
SEND_STRING dvraritan2, "'admin',$0D"
}
WAIT 20{
SEND_STRING dvraritan1, "'power',$0D"
SEND_STRING dvraritan2, "'power',$0D"
}
WAIT 25{
SEND_STRING dvraritan1, "'outlets 3-20 on /y',$0D"
SEND_STRING dvraritan2, "'outlets 4-8,10-20 on /y',$0D"
}
WAIT 30{
SEND_STRING dvraritan1, "'exit',$0D"
SEND_STRING dvraritan2, "'exit',$0D"
}
WAIT 35
{
IP_CLIENT_CLOSE(3)
IP_CLIENT_CLOSE(4)
}
}
}
//End Coding
Below is the error I get from diagnostics bar:
Line 12356 (11:09:58):: ClientOpen mxInetAddr or hostGetNyName error 0x0
Line 12357 (11:09:58):: CIpEvent::OnError 0:2:1
Line 12358 (11:09:58):: CIpLibrary::Hextoi - Error
Line 12359 (11:09:59):: UNKNOWN HOST:
Line 12360 (11:09:59):: ClientOpen mxInetAddr or hostGetNyName error 0x0
Line 12361 (11:09:59):: CIpEvent::OnError 0:2:1
Line 12362 (11:09:59):: UNKNOWN HOST:
Can anyone give me some advice on this ?
Thank You
Comments
-
I've never controlled one of these, but you have to use the protocol the device understands. If its HTTP you will need to send the HTTP headers and footers. If its JSON, you will have to format accordingly. Without knowing more about the device in question its hard to help further.
You can't just send commands over a link. Generally communicating with an IP device is a formatted conversation that has to conform to certain standards. Often once a command is received the connection is closed so you will have to monitor the state of the port to make sure its open before sending commands.
Paul -
I am control via telnet,port 23. Last time I use same method to contorl APC PDU and it is work. I don't know why this time round apply on Raritan PDU it is not work.
Below message I capture from diagnostics bar, is it mean that the command is error or the programming method is not correct?
Line 43 (15:44:44):: SendString to socket-local port (17) invalid
Line 44 (15:44:44):: SendString to socket-local port (18) invalid
Line 45 (15:44:44):: CIpEvent::OnError 0:17:1
Line 46 (15:44:44):: CIpEvent::OnError 0:18:1 -
IP communication requires management. You can't just send the IP client open command and assume it worked. I'd recommend using the data_event online and offline to determine ths status of the port connection. Once you know your connection is good then send the strings.
In the data_event>string event you can monitor for returns from the device. You can also use Create_Buffer to collect string returns.
But you can't just assume the connection which is what your code currently does. -
Ok, I will try it out. Thanks:)
-
Also, try your IP address in Double and single quotes:
IP_CLIENT_OPEN(3," '146.40.31.16' ",23,1) IP_CLIENT_OPEN(4," '146.40.31.17' ",23,1)
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums