Raritan PX2 PDU(Help!)
edwinpang47
Posts: 5
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
0
Comments
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
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
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.