Raritan PX2 PDU(Help!)

edwinpang47edwinpang47 Junior MemberPosts: 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

Comments

  • a_riot42a_riot42 AMX Wizard Posts: 1,619
    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
  • edwinpang47edwinpang47 Junior Member Posts: 5
    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
  • ericmedleyericmedley Senior Member - 3709 Posts Posts: 4,159
    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.
  • edwinpang47edwinpang47 Junior Member Posts: 5
    Ok, I will try it out. Thanks:)
  • GregGGregG Just some guy... Posts: 249
    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)
    
Sign In or Register to comment.