LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stanley QPM communication OPEN protocol communication using TCP

Solved!
Go to solution

I am trying to communicate with a Stanley QPM controller using Atlas Copco's OPEN protocol by a TCP connection. Here is some documentation on the protocol. This is through an Ethernet connection using a unique IP through port 4545. I am unsure if my VI is able to send and receive commands, I can ping the IP and it recieves, but when I send an initialization through TCP write "00200001          ". Nothing returns. Is this the correct way to approach this communication protocol?

 

image.pngimage.png

0 Kudos
Message 1 of 5
(2,613 Views)
Solution
Accepted by topic author ECeb053

Quickly going over the manual, it looks like it expects a header of 20 bytes then an optional data field and message end. From what I can tell you are sending the header correctly, but not adding the null terminator. I would concat. your message with 0x00 to add the nul. 

 

Add a string constant, change the display to hex and enter 00, then concat that with your message before sending it over TCP.

 

Command with Nul term.png

 

Edit -

Also in your read, you specify 57 bytes but you really don't know how many bytes will be written back without looking at the header. You should expect at least 20 bytes from the header, but then need to decode from that how many more bytes there are to read. 

0 Kudos
Message 2 of 5
(2,581 Views)

Yup that seemed to work. Here is the new VI with a response

ECeb053_0-1595890881547.png

 

0 Kudos
Message 3 of 5
(2,547 Views)

Nice! Interesting communication protocol I've never used before but the documentation is pretty good.

0 Kudos
Message 4 of 5
(2,523 Views)

Hi, I am currently trying to communicate a Desoutter controller for a screw driver, could you share that vi?

What controller are you using?

 

-Jorge

0 Kudos
Message 5 of 5
(2,232 Views)