Ricoh SC-10 Series Operating Instructions Manual
Ricoh SC-10 Series Operating Instructions Manual

Ricoh SC-10 Series Operating Instructions Manual

Socket mode function
Hide thumbs Also See for SC-10 Series:

Advertisement

Quick Links

INSPECTION CAMERA SYSTEM
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions
RICOH Industrial Solutions Inc.
RICOH SC-10 SERIES
Socket Mode Function Operating Instructions Ver.1.0.0
1/66

Advertisement

Table of Contents
loading

Summary of Contents for Ricoh SC-10 Series

  • Page 1 INSPECTION CAMERA SYSTEM RICOH SC-10 SERIES Socket Mode Function Operating Instructions RICOH Industrial Solutions Inc. RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 1/66...
  • Page 2 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 2/66...
  • Page 3: Table Of Contents

    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 3/66...
  • Page 4: Overview

    SC-10A Other device Example 2: Multiple devices can be connected. SC-10A (#1) Multiple SC-10A can be managed with another device. SC-10A (#2) SC-10A (#3) Other device SC-10A (#4) SC-10A (#n) RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 4/66...
  • Page 5: Socket Mode

    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. Select [Socket Mode]. Select the [Enable Socket Mode] check box.
  • Page 6: Setting The Debug Mode

     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. RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 6/66...
  • Page 7: Status Transition Diagram

    Timeout Work ID completed response Start request Timeout Work item completed Work item completed response response Work ID Executing work Executing work completed item Stop request Stop request Start request RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 7/66...
  • Page 8: Sequences

    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 ログアウト通知 Login notification ログアウト通知応答 Login notification response RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 8/66...
  • Page 9: Status Check

    作業Itemリストデータ通知 Work item list data notification 作業Itemリストデータ通知 Work item list data notification Work item list acquisition 作業Itemリスト取得完了通知 completed notification 作業Itemリスト取得完了応答 Work item list acquisition completed response RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 9/66...
  • Page 10: Work Id Execution Processing

    Work ID start response Start要求 Start request Start response Start応答 Work item completed notification 作業Item完了通知(マッチング) (matching) 作業Item完了応答 Work item completed response 作業ID完了通知 Work ID completed notification 作業ID完了応答 Work ID completed response RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 10/66...
  • Page 11: External Io (Out) Link

    Work item completed notification 作業Item完了通知(マッチング) BUSY (1) (matching) BUSY(↓) OK(↑) OK (1) 作業Item完了応答 Work item completed response 作業ID完了通知 RUN (1) Work ID completed notification RUN(↓) 作業ID完了応答 Work ID completed response RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 11/66...
  • Page 12: Matching Of Multiple Work Items Of One Work Id

    作業Item完了応答 Work item completed When the work items within the work ID finish, a work 作業ID完了通知 Work ID completed notification ID completed notification is sent. 作業ID完了応答 Work ID completed response RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 12/66...
  • Page 13: Stopping Work Item (Tcp/Ip)

    Start応答 Start response Stop要求 Stop request Stop応答 Stop response Work item completed notification 作業Item完了通知(Stop) (stop) 作業Item完了応答 Work item completed response 作業ID完了通知 Work ID completed notification 作業ID完了応答 Work ID completed response RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 13/66...
  • Page 14: Message Crossing (Stop Request)

    作業Item完了通知(マッチング) (matching) The processing ended Stop要求 Stop request successfully so the stop request is discarded. 作業Item完了応答 Work item completed response 作業ID完了通知 Work ID completed notification 作業ID完了応答 Work ID completed response RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 14/66...
  • Page 15: Start Request Timeout

    Work ID start response Start request Start要求 Start応答 Start response Work item completed 作業Item完了通知(マッチング) notification (matching) Work item completed 作業Item完了応答 response タイムアウト通知 Timeout notification 作業ID完了通知 Work ID completed (T.O) notification (T.O) RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 15/66...
  • Page 16: Message Ids

    Work item list data notification 0x10010009 Work item list acquisition completed 0x1001000B notification Work item list acquisition completed 0x0001000B response Login notification 0x1001000C Login notification response 0x0001000C Logout notification 0x1001000D RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 16/66...
  • Page 17: Message Headers

    Message ID Message unique ID 0x0004 4 byte uint32 Device ID Equipment unique ID Up to 50 half-width alphanumeric 0x0008 - 0x0047 64 byte char Device name characters long RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 17/66...
  • Page 18: Message Id (Request Message: Other Device → Sc-10A)

    Up to 50 half-width alphanumeric 0x0008 - 0x0047 64 byte char Device name characters long Up to 50 half-width alphanumeric 0x0048 - 0x0087 64 byte char Work ID characters long RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 18/66...
  • Page 19 Up to 50 half-width alphanumeric 0x0148 - 0x0187 64 byte char Work number characters long Set the lower 2 bytes in the sum value from 0x0188 2 byte uint16 Checksum value 0x0000 to 0x0187. RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 19/66...
  • Page 20 Set the lower 4 bytes of the MAC address 0x0004 4 byte uint32 Device ID of the SC-10A. Up to 50 half-width alphanumeric 0x0008 - 0x0047 64 byte char Device name characters long RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 20/66...
  • Page 21 Message ID Message unique ID 0x0004 4 byte uint32 Device ID Equipment unique ID Up to 50 half-width alphanumeric 0x0008 - 0x0047 64 byte char Device name characters long RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 21/66...
  • Page 22 Up to 50 half-width alphanumeric 0x0148 - 0x0187 64 byte char Work number characters long Set the lower 2 bytes in the sum value from 0x0188 2 byte uint16 Checksum value 0x0000 to 0x0187. RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 22/66...
  • Page 23 Up to 50 half-width alphanumeric 0x0008 - 0x0047 64 byte char Device name characters long Up to 50 half-width alphanumeric 0x0048 - 0x0087 64 byte char Work ID characters long RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 23/66...
  • Page 24 64 byte char Device name characters long Up to 50 half-width alphanumeric 0x0048 - 0x0087 64 byte char Work ID characters long 0x0088 4 byte uint32 External IO Bit field RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 24/66...
  • Page 25 Use the lower 4 bytes of the MAC address 0x0004 4 byte uint32 Device ID of the SC-10A. Up to 50 half-width alphanumeric 0x0008 - 0x0047 64 byte char Device name characters long RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 25/66...
  • Page 26: Message Id (Notification Message Response: Other Device → Sc-10A)

    Equipment unique ID Up to 50 half-width alphanumeric 0x0008 - 0x0047 64 byte char Device name characters long 0: OK 0x0048 2 byte int16 Result -1: Failed 0x004a 2 byte uint16 reserve RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 26/66...
  • Page 27 0x0008 - 0x0047 64 byte char Device name characters long 0: Normal operation 0x0048 2 byte int16 Result 1: Re-execute 2: Complete work ID forcibly 0x004a 2 byte uint16 reserve RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 27/66...
  • Page 28 Equipment unique ID Up to 50 half-width alphanumeric 0x0008 - 0x0047 64 byte char Device name characters long 0: OK 0x0048 2 byte int16 Result -1: Failed 0x004a 2 byte uint16 reserve RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 28/66...
  • Page 29 Equipment unique ID Up to 50 half-width alphanumeric 0x0008 - 0x0047 64 byte char Device name characters long 0: OK 0x0048 2 byte int16 Result -1: Failed 0x004a 2 byte uint16 reserve RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 29/66...
  • Page 30 Equipment unique ID Up to 50 half-width alphanumeric 0x0008 - 0x0047 64 byte char Device name characters long 0: OK 0x0048 2 byte int16 Result -1: Failed 0x004a 2 byte uint16 reserve RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 30/66...
  • Page 31 Equipment unique ID Up to 50 half-width alphanumeric 0x0008 - 0x0047 64 byte char Device name characters long 0: OK 0x0048 2 byte int16 Result -1: Failed 0x004a 2 byte uint16 reserve RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 31/66...
  • Page 32: Message Id (Request Response Message: Sc-10A → Other Device)

    0x0050 2 byte int16 Result -1: Failed Refer to 0x0052 2 byte uint16 Error code Up to 50 half-width alphanumeric 0x0054 – 0x0092 64 byte char Work ID characters long RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 32/66...
  • Page 33 Set 0 to 59 for the time of the SC-10A. 0x004f 1 byte uchar reserve Unused area 4.Error Code (P.52) 0: OK 0x0050 2 byte int16 Result -1: Failed Refer to 0x0052 2 byte uint16 Error code RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 33/66...
  • Page 34 Set 0 to 59 for the time of the SC-10A. 0x004f 1 byte uchar reserve Unused area 4.Error Code (P.52) 0: OK 0x0050 2 byte int16 Result -1: Failed Refer to 0x0052 2 byte uint16 Error code RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 34/66...
  • Page 35 4.Error Code (P.52) 0x004f 1 byte uchar reserve Unused area 1-32767: Total number of items 0x0050 2 byte int16 Result -1: Failed 0x0052 2 byte uint16 Error code Refer to RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 35/66...
  • Page 36 Set 0 to 59 for the time of the SC-10A. 4.Error Code (P.52) 0x004f 1 byte uchar reserve Unused area 0: OK 0x0050 2 byte int16 Result -1: Failed 0x0052 2 byte uint16 Error code Refer to RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 36/66...
  • Page 37 0x0050 2 byte int16 Result -1: Failed 0x0052 2 byte uint16 Error code Refer to Up to 50 half-width alphanumeric 0x0054 - 0x0093 64 byte char Work ID characters long RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 37/66...
  • Page 38 Set 0 to 59 for the time of the SC-10A. 4.Error Code (P.52) 0x004f 1 byte uchar reserve Unused area 0: OK 0x0050 2 byte int16 Result -1: Failed 0x0052 2 byte uint16 Error code Refer to RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 38/66...
  • Page 39 5, 6: Starting work ID 4.Error Code (P.52) 7, 13: Executing work item 8,9,14: Executing work ID 10,11,12: Work ID completed 15: Timeout -1: Failed 0x0052 2 byte uint16 Error code Refer to RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 39/66...
  • Page 40: Message Id (Notification Message: Sc-10A → Other Device)

    Set 0 to 59 for the time of the SC-10A. 0x004e 1 byte uchar Second Set 0 to 59 for the time of the SC-10A. 0x004f 1 byte uchar reserve Unused area RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 40/66...
  • Page 41 Judgment result reserve recognition) 0x02c4 Rotation angle Matching time [msec] 0x02c8 Similarity Mode (color 0x0330 Check point ID_9 Judgment result reserve recognition) 0x0334 Rotation angle Matching time [msec] 0x0338 Similarity RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 41/66...
  • Page 42 Rotation angle Set from 180 to -180. Matching time 0x02b6 2 byte uint16 Set from 0 to 999. [msec] 0x02b8 8 byte double Similarity Set from 0.00000 to 1.00000. RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 42/66...
  • Page 43 (null is possible) Work item last 0: OK 0x02a0 2 byte uint16 result -1: Failed Elapsed time 0x02a2 2 byte uint16 Set the work elapsed time in seconds. (seconds) RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 43/66...
  • Page 44 Up to 198 half-width alphanumeric 0x0100 - 0x01d7 char Worker ID byte characters long (null is possible) Up to 198 half-width alphanumeric 0x01d8 - 0x029f char Work number byte characters long (null is possible) RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 44/66...
  • Page 45 0: Stopped from UI 0x0100 2 byte int16 Cause of stop 1: Stopped from external IO Elapsed time 0x0102 2 byte uint16 Set the work elapsed time in seconds. (seconds) RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 45/66...
  • Page 46 Set 1 to 12 for the time of the SC-10A. 0x004f 1 byte uchar reserve Unused area Up to 50 half-width alphanumeric 0x0050 - 0x008f 64 byte char Work ID characters long RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 46/66...
  • Page 47 Work instruction Up to 50 half-width alphanumeric 0x0090 - 0x00cf 64 byte char list characters long Up to 50 half-width alphanumeric 0x00d0 - 0x00ff 64 byte char Work item characters long RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 47/66...
  • Page 48 Set 1 to 12 for the time of the SC-10A. 0x004f 1 byte uchar reserve Unused area Number of 0x0001-0x7FFF: Total number of items 0x0050 2 byte int16 transfers 0xFFFF: Failed 0x0052 2 byte uint16 Error code RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 48/66...
  • Page 49 Second Set 1 to 12 for the time of the SC-10A. 0x004f 1 byte uchar reserve Unused area 0: Administrator mode 0x0050 4 byte uint32 Login mode 1: User mode RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 49/66...
  • Page 50 Second Set 1 to 12 for the time of the SC-10A. 0x004f 1 byte uchar reserve Unused area 0: Administrator mode 0x0050 4 byte uint32 Login mode 1: User mode RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 50/66...
  • Page 51 1 byte uchar Second Set 1 to 12 for the time of the SC-10A. 0x004f 1 byte uchar reserve Unused area 0: Shutdown 0x0050 4 byte uint32 Stop mode 1: Restart RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 51/66...
  • Page 52: Error Code

    Status transition request was received in Item acquisition 0x0105 The request may have been failure other than the waiting request sent during matching or before state. the work ID completion response. RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 52/66...
  • Page 53 Set the refused by the 0x0500 ConnectionRefused Startup notification communication of the communication partner Error application to be allowed in the (or a timeout occurred). OS of the connection destination. RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 53/66...
  • Page 54 Startup notification TemporaryError occurred. be inappropriate. Connection error An error for which the An error for which the cause is 0x05FF UnknownSocketErr cause is unknown Startup notification unknown is occurring. occurred. RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 54/66...
  • Page 55: Sample Code

    *buff); void setdata(struct dataformat *data, argc, char *argv[]); int checkdef(int argc, char *str[]); void num2buff(u_int num, size, start, char *buff); struct dataformat u_int messageID; u_int DeviceID; char DeviceName[64]; RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 55/66...
  • Page 56 = { 4,4,64 }; const int NAMESIZE = 50; num2buff(data->messageID, charlength[0], 0, buff); num2buff(data->DeviceID, charlength[1], charlength[0], buff); size_t dlen = (strlen(data->DeviceName) > NAMESIZE) ? NAMESIZE : strlen(data->DeviceName); memcpy(buff + charlength[1]+charlength[0], data->DeviceName, dlen); RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 56/66...
  • Page 57 \"IPaddr(xxx.xxx.xxx.xx)\" -\"portnum\"\n"); printf("press Enter\n"); scanf("%s", def); return return void num2buff(u_int num, size, start, char *buff) for (int i = 0;i < size;i++) buff[start + i] = >> i * 8; RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 57/66...
  • Page 58: Receive Program

    &ret); return // Connection wait start result = listen(s, 1); (result < 0) printf("Connection permission error\n"); printf("Press any key\n"); scanf("%c", &ret); return printf("Start connection\n"); RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 58/66...
  • Page 59 #ifdef WIN32 WSACleanup(); #endif printf("Press any key\n"); scanf("%c", &ret); return SOCK_TYPE MakeServerSocket(struct sockaddr_in *dest, port) dest->sin_port = htons(port);//Specify port number dest->sin_family = AF_INET;//IPv4 dest->sin_addr.s_addr = htonl(INADDR_ANY); return socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 59/66...
  • Page 60: Send Program

    = resize(sendbytes, buf, 64); long checksum = 0; foreach (byte onebyte sendbytes) checksum += onebyte; buf = BitConverter.GetBytes(checksum);//checksum sendbytes = resize(sendbytes, buf, 2); buf = BitConverter.GetBytes(0);//reserve sendbytes = resize(sendbytes, buf,2); return sendbytes; RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 60/66...
  • Page 61 Send(byte[] sendBytes) (sendBytes == null) return; (Socket.LocalEndPoint != null) this.Socket.Send(sendBytes); else Console.WriteLine("Sending failed.") ; The time and message are added to TCPDebugLog of the SC-10A when sending completes. RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 61/66...
  • Page 62: Receive Program

    // Callback process when connection accepted private void AcceptCallback(IAsyncResult asyncResult) // Set signal so that wait thread progresses AllDone.Set(); RICOH SC-10 SERIES // Acquire socket Socket Mode Function Operating Instructions Ver.1.0.0 62/66 listenerSocket = asyncResult.AsyncState Socket; clientSocket = listenerSocket.EndAccept(asyncResult);...
  • Page 63 // Set callback process again for when receive clientSocket.BeginReceive(state.Buffer, 0, StateObject.BufferSize, 0, AsyncCallback(ReceiveCallback), state); Console.WriteLine("\nReceiving complete\n"); else // Determine to be disconnected when receive 0 byte of data clientSocket.Close(); this.ClientSockets.Remove(clientSocket); RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 63/66...
  • Page 64: Flow Charts

    Create message data “Sending Set IP address and complete” port number Create SC10 TCP client instance Waiting for input Create socket new Socket Connect this.Socket.Connect connection successful? Connection failed RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 64/66...
  • Page 65 Create socket listenerSocket = new Socket Acquire receive socket Bind asyncResult.AsyncState as Socket listenerSocket.Bind Start receiving Display received byte listenerSocket.Listen array Was receiving Wait again successful? clientSocket.BeginReceive Communication port connection failed. RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 65/66...
  • Page 66 Revision History Rev. Date Changes Note 1.00 2019/01/31 New issue RICOH Industrial Solutions Inc. RICOH SC-10 SERIES Socket Mode Function Operating Instructions Ver.1.0.0 66/66...

Table of Contents