From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

tcp/ip communication protocol

Hi All,

 

I've never done any Labview programming for TCP/IP as of late.  But now I need to figure how to.  

 

I've been asked to work on a Pick to Light system that is controlled via TCP/IP comm.

 

The Communication data is sent via a CCB (Communication Control Block) format as below.

 

ccb.JPG

 

 

The image below shows how to turn on a certain 7-segment LED to display a certain number.

 

ccb2.JPG

 

 

What I'm trying to figure out is, how do you send the formated data via TCP/IP.  As you know again, I've never worked with TCP/IP before.  

 

I've done a ton of searching etc for how to send the data in a format that is similar to what the controller needs but have yet to find anything similar.  

 

I'm not asking for you to do the coding for me, just need some guidance on how to.

 

I also attached the comm protocol for reference.

 

Thanks a ton in advanced,

guytesting

0 Kudos
Message 1 of 6
(3,717 Views)
TCP/IP is just the physical layer. The protocol is actually similar to many serial instruments that require you send hex instead of ASCII text. You can use a string control/constant set for hex display. This is a right click option. You can also use a U8 array and the Byte Array to String function. Change the display to hex to make it more readable.
0 Kudos
Message 2 of 6
(3,689 Views)
Aside from the minor point that ATOP obviously didn't hire an English speaker to translate their manual, the documentation actually seems pretty good. The idea is that once you have established a connection, TCP/IP works a lot like a full-duplex serial link. You send packets and you receive packets.

For this family of devices there is a common protocol used that is documented in the manual. Some packets are like commands and only flow from the PC to the pickers. Some packets are data updates and only flow from the pickers back to the PC.

It appears that the manual gives examples of all packets using diagrams where each line visually represent one byte. For example, the first two lines are always the CCB length. Line 0 is the LSB, Line 1 is the MSB of a 16-bit byte count. So every packet will start with a 2-byte packet length.

MIke...

Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 3 of 6
(3,681 Views)

I'm sorry for being retarded, but what would a sample data package be?

 

I have no concept of how a TCP/IP data package would even look like.

 

I know using visa, it is rather simple by just writing the command to the port i.e.) RUN, IDN, etc.

 

The ATOP command block seems that it would need a string/array of commands strung together.  How would you seperate them etc. 

 

Would a command look something like this (example only from the top of my head): 0FH/00F/00H etc to the the port? or one at a time like 0FH wait and listen then 00F, etc.

 

Thanks...

0 Kudos
Message 4 of 6
(3,603 Views)
A TCP/IP packet can be anything you want. In this case, the manual explains exactly what is sent. Creating the pallet is no different than creating a packet of data for the VISA Write. You can use VISA for TCP/IP if you want.

I don't think you understand using non-ASCII - whether TCP/IP or VISA. As already mentioned, you can create the string by converting an array of U8. Each element is a single byte and these single bytes are defined on the manual. You send all of the bytes at once. No different than sending IDN? at once, they are just different bytes.
0 Kudos
Message 5 of 6
(3,593 Views)
With different display options to be clearer. Right click on any strong control/constant to see the display options.
0 Kudos
Message 6 of 6
(3,579 Views)