Ricoh SC-10 Series Operating Instructions Manual

RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0 1/66
Socket Mode Function Operating Instructions
RICOH Industrial Solutions Inc.
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0 2/66
How to Read This Manual
About Symbols
The symbols used in this manual have the following meanings.
Indicates an explanation containing points to pay attention to when operating the device, restrictions, or other information. Be sure to read the explanation.
Indicates an explanation containing information that is useful to know, a supplementary operating procedure, or other information.
/(→P. ##)
Indicates reference information.
Indicates a screen item or button name.
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0 3/66
Contents
OVERVIEW .................................................................................................................................................................. 4
Applicable Devices and Connection Configuration ...................................................................................................... 4
Applicable models ................................................................................................................................................... 4
Connection configuration ......................................................................................................................................... 4
SOCKET MODE .......................................................................................................................................................... 5
Enabling the Socket Mode Control Function ................................................................................................................ 5
Setting the Debug Mode ............................................................................................................................................... 6
Status Transition Diagram ............................................................................................................................................ 7
Sequences .................................................................................................................................................................... 8
Processing at startup ............................................................................................................................................... 8
Logout ...................................................................................................................................................................... 8
Status check ............................................................................................................................................................ 9
Work item list acquisition ......................................................................................................................................... 9
Work ID execution processing ............................................................................................................................... 10
Work ID switching and start processing ................................................................................................................ 10
External IO (OUT) link ........................................................................................................................................... 11
Matching of multiple work items of one work ID .................................................................................................... 12
Stopping work item (TCP/IP) ................................................................................................................................. 13
Message crossing (stop request) .......................................................................................................................... 14
Start request timeout ............................................................................................................................................. 15
Work item completed notification response timeout .............................................................................................. 15
MESSAGE IDS .......................................................................................................................................................... 16
Socket Mode Message IDs ......................................................................................................................................... 16
Message Headers ....................................................................................................................................................... 17
Message ID (Request Message: Other Device → SC-10A)....................................................................................... 18
Message ID (Notification Message Response: Other Device → SC-10A) ................................................................. 26
Message ID (Request Response Message: SC-10A → Other Device) ..................................................................... 32
Message ID (Notification Message: SC-10A → Other Device) .................................................................................. 40
ERROR CODE ........................................................................................................................................................... 52
SAMPLE CODE ......................................................................................................................................................... 55
C Language ................................................................................................................................................................ 55
Send program ........................................................................................................................................................ 55
Receive program ................................................................................................................................................... 58
C# ............................................................................................................................................................................... 60
Send program ........................................................................................................................................................ 60
Receive program ................................................................................................................................................... 62
FLOW CHARTS ......................................................................................................................................................... 64
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0 4/66

Overview

The inspection camera system (SC-10A series) can be connected with an external device using the TCP/IP socket mode function. This manual describes the connection procedure for socket mode and the data formats to set for socket mode.

Applicable Devices and Connection Configuration

Applicable models

The following devices support socket mode.
Inspection camera system: SC-10A (Ver. 4.0.0 or later) Inspection camera system: SC-10A (H) (Ver. 4.0.0 or later)

Connection configuration

If Ethernet connections are used, multiple inspection camera systems can be connected. Example 1:
Example 2:
Ethernet connection
Multiple devices can be connected.
Multiple SC-10A can be managed with another device.
Other device
Other device
SC-10A (#1)
SC-10A (#2)
SC-10A (#3)
SC-10A (#4)
SC-10A (#n)
SC-10A
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0 5/66

Socket Mode

Enabling the Socket Mode Control Function

Set the socket mode control function of the SC-10A in the [Settings] screen of the SC-10A. Log in to the SC-10A in the administrator mode and then select [Job Settings...] in the [Job] menu to display the [Settings] screen.
For details on operation of the SC-10A, refer to the operating instructions of the SC-10 series.
1. Select [Socket Mode].
2. Select the [Enable Socket Mode] check box.
3. Set the IP address of the other device (other party with which to perform socket mode) in [Destination IP Address].
4. Enter the name of the device in [Device Name].
Enter any name from 1 to 50 half-width alphanumeric characters long.
5. Click [Save].
The settings are saved.
[Device ID] is set automatically by the system.
1
2 3 4
5
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0 6/66

Setting the Debug Mode

The debug mode can be set. When developing an application for the other device, you can use the debug mode to check communication and verify operation.
To set debug mode, you need to enable the socket mode function in advance (
→P.5
).
1. Select [Debug Mode] in the socket mode settings screen.
2. Click [Save].
When the debug mode is enabled, the logs of sent and received messages (date and time sent/received, message ID,
sent/received information, and error code) are displayed in the log display area. If you click [Save Log], you can save
the logs to media.
If you select a message to send to the other device from the pull-down menu and then click the [Test] button, the
message is sent.
Send a message to the other device.
Save the log data.
2
Log display area
1
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0 7/66

Status Transition Diagram

Prepare to start
Wait to log in
Transferring
work item
Startup
notification
response
Start work ID
Timeout
Executing work
ID
Work ID
completed
Executing work
item
Logout
notification
response
Login notification response
Work item list
acquisition
request
Acquisition completed response
Work ID execution
request
Work ID start request
Work ID completed notification (T.O)
Timeout
Work ID completed response
Timeout
Work item
completed
response
Stop request
Work item completed response
Stop request
Start request
Idle
Start request
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0 8/66

Sequences

This section describes the sequences supposed to be used with the work instruction network control function.

Processing at startup

The SC-10A sends a startup notification to the other device after startup. The application of the other device sends a startup notification response after receiving the startup notification. The SC-10A sends the login information in a login notification after receiving the startup notification response. The other device sends a login notification response and the sequence ends.
Startup notification (when successful):

Logout

When the logout operation is performed, the SC-10A sends a logout notification. The other device sends a logout notification response and the sequence ends.
SC-10A
SC-10A
Other device
Startup notification
Startup notification response
Login notification response
Login notification
SC-10A
Other device
Login notification
Login notification response
SC-10A
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0 9/66

Status check

When the status of the SC-10A is checked from the other device, a status check request is sent from the other device. The status of the camera is sent as a status check response at arbitrary timing.

Work item list acquisition

When a work item registered on the SC-10A is acquired, a work item list acquisition request is sent from the other device. The SC-10A sends a work item list response and then sends work item list data notifications. One work item list data notification is sent per work item registered on the SC-10A. When sending of the work item list data notifications for all of the work items is complete, the work item list acquisition completed notification is sent. The other device sends a work item list acquisition completed response and the sequence ends.
SC-10A
SC-10A
Item
Item
Item
Item
Item
Item
Item
Item
Item
Notifications are sent for all of the held work items.
Other device
Status check request
Status check response
SC-10A
Other device
Work item list acquisition request
Work item list data notification
Work item list data notification
Work item list data notification
Work item list data notification
Work item list data notification
Work item list acquisition
Work item list acquisition
Work item list acquisition
SC-10A
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0 10/66

Work ID execution processing

When the work ID of the SC-10A is switched from the other device to execute the sequence starting with the first work item registered to the work ID, a work ID execution request is sent from the other device. The work items are executed sequentially from the first one registered to the work ID. The execution result is sent in a work item completed notification from the SC-10A. When execution of all work items registered to the work ID is completed, the SC-10A sends a work ID completed notification. The other device sends a work ID completed response to the SC-10A and the sequence ends.

Work ID switching and start processing

When the work ID switching and start processing is executed from the other device, a work ID start request is sent from the other device. The SC-10A sends a work ID start response. If there is no problem with the response result, the other device sends a start request. If there is no problem with the start response from the SC-10A, the other device waits for a work item completed notification sent from the SC-10A after the work item execution completes. When the work item completed notification is received, a work item completed response is sent from the other device. When all work items of the work ID are completed, the SC-10A sends a work ID completed notification. The other device sends a work ID completed response and the sequence ends.
SC-10A
Item()
Item
ID
ID
ID
ID
SC-10A
Start
Start
Item()
Item
ID
ID
ID
ID
Other device
Work ID execution request
Work ID execution response
Work item completed notification
(matching)
Work item completed response
Work ID completed notification
Work ID completed response
SC-10A
Other device
Work ID start request
Work ID start response
Start request
Start response
Work item completed notification
(matching)
Work item completed response
Work ID completed notification
Work ID completed response
SC-10A
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0 11/66

External IO (OUT) link

When an external IO (OUT) is set, the sequence is as shown below when the work ID is started/ended by socket mode.
SC-10A
Start
Start
Item()
Item
ID
ID
ID
ID
(IO)
RUN()
BUSY()
BUSY()
OK()
RUN()
Other device
SC-10A
Other device
(external IO)
RUN (1)
BUSY (1)
BUSY (1)
OK (1)
RUN (1)
Work ID start request
Work ID start response
Start request
Start response
Work item completed notification
(matching)
Work item completed response
Work ID completed notification
Work ID completed response
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0 12/66

Matching of multiple work items of one work ID

When multiple work items are registered to one work ID, multiple start requests/responses and work item completed notifications/responses are repeated for one work ID start request/response. The execution order does not matter as long as the work items are within one work ID.
SC-10A
Start(Item1)
Start
Item(Item1 )
Item
ID
ID
ID
ID
Start(Item2)
Start
Item(Item2 )
Item
All work items registered to the work ID are executed.
When the work items within the work ID finish, a work ID completed notification is sent.
Other device
SC-10A
Work ID start request
Work ID start response
Start request (Item 1)
Start response
Work item completed notification
(Item 1 matching)
Work item completed
Start request (Item 2)
Start response
Work item completed notification
(Item 2 matching)
Work item completed
Work ID completed notification
Work ID completed response
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0 13/66

Stopping work item (TCP/IP)

When the processing during the period from the start request and work item completed notification is stopped, the work stops when the stop request is sent to the SC-10.
SC-10A
Start
Start
Item(Stop)
Item
ID
ID
ID
ID
Stop
Stop
Other device
SC-10A
Work ID start request
Work ID start response
Start request
Start response
Stop request
Stop response
Work item completed notification
(stop)
Work item completed response
Work ID completed notification
Work ID completed response
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0 14/66

Message crossing (stop request)

If the work item completed notification and the stop request are sent at almost the same time, priority is given to processing the message that arrived in the received thread of the SC-10A first. The following shows the sequence when the work item completed notification is received before the stop request. The work item completed notification that was received first is processed and then the stop request is discarded.
SC-10A
Start
Start
Item()
Item
ID
ID
ID
ID
Stop
The processing ended successfully so the stop request is discarded.
Other device
SC-10A
Work ID start request
Work ID start response
Start request
Start response
Work item completed notification
(matching)
Stop request
Work item completed response
Work ID completed notification
Work ID completed response
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0 15/66

Start request timeout

If the start request from the other device did not arrive at the SC-10A for some reason, a timeout notification is sent internally in the system after the timer set inside the SC-10A expires in order to perform the timeout process. Check the network status and take a measure from the other device.

Work item completed notification response timeout

If the work item completed notification response from the other device did not arrive at the SC-10A for some reason, a timeout notification is sent internally in the system after the timer set inside the SC-10A expires in order to perform the timeout process. Check the network status and take a measure from the other device.
SC-10A() (PC)
Start
ID
ID
ID
(T.O)
SC-10A() (PC)
Start
Start
Item()
Item
ID
ID
ID
(T.O)
SC-10A (received
thread)
Work ID start request
Other device
(PC)
Work ID start response
Start request
Timeout notification
Work ID completed
notification (T.O)
SC-10A (received
thread)
Work ID start request
Other device
(PC)
Work ID start response
Start request
Start response
Work item completed
notification (matching)
Work item completed
response
Timeout notification
Work ID completed
notification (T.O)
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0 16/66

Message IDs

This section describes the message IDs to use in socket mode.

Socket Mode Message IDs

Message name
Message ID
Other device →
SC-10A
SC-10A → Other
device
Requests
Work ID start request
0x00000001
Work ID start response
0x10000001
Start request
0x00000002
Start response
0x10000002
Stop request
0x00000003
Stop response
0x10000003
Work item list acquisition request
0x00000004
Work item list acquisition response
0x10000004
Work ID execution request
0x00000005
Work ID execution response
0x10000005
Work ID change request
0x00000006
Work ID change response
0x10000006
External IO input request
0x00000007
External IO input response
0x10000007
Status check request
0x00000008
Status check response
0x10000008
Notifications
Startup notification
0x10010001
Startup notification response
0x00010001
Work item completed notification (matching)
0x10010002
Work item completed notification (serial number)
0x10010003
Work item completed notification (check mode)
0x10010004
Work item completed notification (stop)
0x10010005
Work item completed response
0x00010007
Work ID completed notification
0x10010008
Work ID completed notification response
0x00010008
Work item list data notification
0x10010009
Work item list acquisition completed notification
0x1001000B
Work item list acquisition completed response
0x0001000B
Login notification
0x1001000C
Login notification response
0x0001000C
Logout notification
0x1001000D
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0 17/66
Logout notification response
0x0001000D
System stop notification
0x1001000E

Message Headers

The following shows the structure of the common message header to set in the data area of socket mode. Use the data in the startup notification sent when the SC-10A starts up for the device ID and device name.
Message format
Address
bit
31
16
15
0
0x0000
Message ID
0x0004
Device ID
0x0008
Device name
Address
Size
Attribute
Field name
Description
0x0000
4 byte
uint32
Message ID
Message unique ID
0x0004
4 byte
uint32
Device ID
Equipment unique ID
0x0008 - 0x0047
64 byte
char
Device name
Up to 50 half-width alphanumeric characters long
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0 18/66

Message ID (Request Message: Other Device → SC-10A)

Work ID start request
Message ID
Message name
Description
0x00000001
Work ID start request
Message to send from the other device to the SC-10A when starting a work ID. When "RUN" is set for OUT0 of the external IO, the state transitions to the ON state.
The rise and fall times are defined by the
user.
Message format
Address
bit
31
16
15
0
0x0000
Message ID
0x0004
Device ID
0x0008
Device name
0x0048
Work ID
Address
Size
Attribute
Field name
Description
0x0000
4 byte
uint32
Message ID
Message unique ID
0x0004
4 byte
uint32
Device ID
Equipment unique ID
0x0008 - 0x0047
64 byte
char
Device name
Up to 50 half-width alphanumeric characters long
0x0048 - 0x0087
64 byte
char
Work ID
Up to 50 half-width alphanumeric characters long
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0 19/66
Start request
Message ID
Message name
Description
0x00000002
Start request
If there is no problem with the work ID start request and response result, a start request is sent from the other device to the SC-10A. Set the work ID, work instruction list, and work item registered at the send destination in accordance with the message format when sending.
Be sure to set the message data after
clearing to zero.
Message format
Address
bit
31
16
15
0
0x0000
Message ID
0x0004
Device ID
0x0008
Device name
0x0048
Work ID
0x0088
Work instruction list
0x00c8
Work item
0x0108
Worker ID
0x0148
Work number
0x0188
Checksum value
reserve
Address
Size
Attribute
Field name
Description
0x0000
4 byte
uint32
Message ID
Message unique ID
0x0004
4 byte
uint32
Device ID
Equipment unique ID
0x0008 - 0x0047
64 byte
char
Device name
Up to 50 half-width alphanumeric characters long
0x0048 - 0x0087
64 byte
char
Work ID
Up to 50 half-width alphanumeric characters long
0x0088 - 0x0107
64 byte
char
Work instruction
list
Up to 50 half-width alphanumeric characters long
0x00c8 - 0x0087
64 byte
char
Work item
Up to 50 half-width alphanumeric characters long
0x0088 - 0x0107
64 byte
char
Work instruction
list
Up to 50 half-width alphanumeric characters long
0x0108 - 0x0147
64 byte
char
Worker ID
Up to 50 half-width alphanumeric characters long
0x0148 - 0x0187
64 byte
char
Work number
Up to 50 half-width alphanumeric characters long
0x0188
2 byte
uint16
Checksum value
Set the lower 2 bytes in the sum value from 0x0000 to 0x0187.
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0 20/66
Stop request
Message ID
Message name
Description
0x00000003
Stop request
If there is no problem with the start request/response, the state becomes the state of executing the specified item. If the stop request is sent before the work item completed notification, the process of recognizing is stopped. If the work item completed notification is received before the stop request due to the timing, the stop request is discarded on the SC-10A receive task side. The stop response is not returned.
Message format
Address
bit
31
16
15
0
0x0000
Message ID
0x0004
Device ID
0x0008
Device name
Address
Size
Attribute
Field name
Description
0x0000
4 byte
uint32
Message ID
Message unique ID
0x0004
4 byte
uint32
Device ID
Set the lower 4 bytes of the MAC address of the SC-10A.
0x0008 - 0x0047
64 byte
char
Device name
Up to 50 half-width alphanumeric characters long
Loading...
+ 46 hidden pages