Question
How do I test if the In-Sight camera is sending messages using TCP/IP Communication in spreadsheet mode?
Answer
Materials required
- In-Sight Vision Suite software installed
- In-Sight camera that can be programmed by In-Sight Vision Suite software
- Hercules software installed
In-Sight Camera Programming
Connect the camera and access it using In-Sight Vision Suite with a new spreadsheet Job.
In this article, you will program a Client and Server communication on the same spreadsheet.

Programming Server
- Start with a clean spreadsheet. On Cell B5, place the TCPServer instruction and define Port 3000.
Click OK.

As soon as you close TCPServer settings, you will notice that Cell C6 has the instruction ReadDevice.
The ReadDevice instruction will display any instruction that the camera gets from Port 3000 on TCP/IP.
- You can also send information to an external device using this Server.
On Cell B7, insert a Button instruction.
The objective is to send data out when this button is pressed.
On Cell B8, place EditString.
This cell will contain the information to send externally.
On Cell D8, type WriteDevice(B7,B5,B8).
B7 is the parameter that indicates the event that triggers the action of writing into the TCPDevice on B5 and the information to write is on B8.
Set camera Online.
Camera must be Online mode in order to send data to external devices.
Verify Camera Server Communication
Select TCP Client tab and fill the information for Module IP and Port.

Click Ping to check if camera IP is OK.

Click Connect, and the software will display that it is connected to the camera.

- In the Send text box, type "Test message$0D$0A".
$0D is the ASCII for CarryReturn and $0A is for LineFeed.
These two ASCIIs are important because on the TCPServer Instruction in the camera by default Package Type is set as String+CRLF, so it is necessary to send CR+LF to indicate that information package is completed. Click Send.

Once sent, you can see the information received on Cell C5.

On Cell B8, type a message to send.
By default, EditString function accepts messages with 8 characters.
You can modify the length of this message by modifying the property. When you have the message to send on Cell B8, then press click on Cell B7.
On Hercules software you could see input (pink color) and output (blue color) messages.

Set camera Offline.

Programming Client
- Start by using a clean spreadsheet.
- On Cell B5 place the TCPClient instruction and define Host Name typing the IP address or PC name of the PC where Hercules software is running Port 3001.
- Click OK.

Note: If you are programming several servers and/or clients on the same spreadsheet, you need to consider using different port numbers. Port numbers cannot be duplicated. - When TCPClient setting window is closed, you will notice that Cell C12 has the WriteDevice instruction with the following parameters:
- $A$0 is the trigger event to send the information (this even could be different)
B12 is TCPClient to be used to send the message on D12

- Also a client can receive data from external devices.
On Cell B14, type ReadDevice(B12).

Put camera into Online mode.

Verify Camera Client Communication
Select TCP Server and indicate the Port number.
This number must be the same as the port declared on In-Sight Vision Suite software.
- Click Listen.
- Now the software is ready to receive all the information from the camera.
- In the Send text box, type the message to communicate.
- Click Send.

In the In-Sight Vision Suite software, you will see that message arrive on cell B14.

Send a trigger on to the camera.

As soon as camera get the trigger information, Cell D12 will be sent to the Hercules software.
