HOME PAGE

 

Cscape Configuration

 

For troubleshooting assistance, see Quick Guide for Troubleshooting

Note: An MQTT license is not required for the OCS360 platform. However, you must have a valid OCS360 subscription plan to begin using the platform.

 

Cscape Configuration

Note:  

The Ethernet port of the device must be configured with an IP address, Subnet, Gateway, and DNS server to connect device with OCS360 platform.

Note: Ensure that the device has Internet access so that it can push data to OCS360 platform.

  1. To configure Ethernet port in Cscape, open Hardware configuration > LAN1.

     

  2. Assign an IP address and other fields manually, entering the values in the respective fields.

    Note: A DNS Server and Gateway must be configured to use OCS360

 

 

  1. To assign an IP address and other fields through DHCP, select Use DHCP to enable the DHCP option.

 

Register-based Advanced Ladder Logic

In Register-based Advanced Ladder Logic, perform the following steps for adding and publishing registers to the OCS360 platform.

 

  1. Open Cscape.
  2. Navigate to the Project Navigator (located on the Home tab in the ribbon).
  3. From the Project Navigator menu tree, expand Networking and select OCS360 to open the OCS360 configuration window.

 

 

 

  1. On the OCS360 Configuration window, the following defaults are available but can be changed:
  • Group Details > Group Name: Default.
  • Update Type > Periodic: 1 second(s).

 

 

  1. Set variable definitions by navigating to the Topic Data Details section in the middle of the screen, then selecting Add Variable to open the Variable Definition window. Enter the desired register name or leave blank for Cscape to automatically assign a name for the register then select OK.

 

 

  1. Adjust the following fields, as needed:
Group Details > Add Group Select to configure publish topics with different update types, or for subscribe topics to create groups and configure the registers for that particular group.
Group Details > Delete Group Select to delete a group
Group Details > Subscribe Select to configure subscribe topics. (See the following example)
Group Details > QOS Select to set a value to manage QOS levels over the network.
(Quality of Service (QOS):)  
Topic Data Details > Edit Variable Select an existing register and use this button for editing the existing register.
Topic Data Details > Delete Variable Select the register to delete and use this button to delete the selected register.
Topic Data Details > Delete All Variables Select this button to delete all existing registers.
   
Update Type > Periodic Select to trigger an update for every configured time.
Update Type > Trigger Bit Select to trigger an update when the trigger register goes high.
Update Type > Change of State Select to trigger an update when the configured bit changes state from OFF to ON or ON to OFF.
Update Type > Change of Value Select to trigger an update when the value in the configured register changes from the last present value.
Update Type > Dead Band Select if there is a value change within the values set in the dead band so that there is no publish triggered.

 

 

 

Subscribe Topics Example:

  1. Select Subscribe to open the Add Group window.
  2. Enter a Group Name and select Add.
  3. Configure as needed.

 

Quality of Service (QOS):

Quality of Service (QOS is an agreement between the sender of a message and the receiver of a message that defines the guarantee of delivery for that message. OCS360 supports two levels of QOS.

  • 0 = At most once
  • 1 = At least once

 

Rate Limit

The number of registers/variables that can be published or subscribed is dependent on the user subscription plan.

  • If the number of registers/variables exceed the plan limit, there will be error for Rate limit exceed in server.
  • OCS360 status register %SR363 Bit 1- toggles between 0 or 1 if the rate limit is exceeded.

 

Rate Limit: Example 1

  • If the user is subscribed for silver plan, then 250 tags/minutes are supported.

  • If the user publishes 6 variables/seconds, then total number of variables /minutes will be 360 which is above the subscribed plan limit.

 

 

In this example, the OCS360 status register %SR363 Bit 1 will toggle between 0 and 1. The rate will also result in an exceeded limit error in the OCS360 platform.

 

 

Rate Limit: Example 2

  • If the user is subscribed for silver plan, then 250 tags/minutes are supported.

  • If the user publishes 3 variables /seconds and 3 variables/minutes, then total number of tags/minutes will be 183 (which is within the limit and there will be no error in this case).

  • A rate limit error may occur due to time drift between OCS and the server. It is recommended to keep publish intervals at least 1 sec above the plan limit to avoid unexpected rate limit errors.

  • If device is power-cycled more than once within the publish interval then rate limit may occur for first publish.

  • For example, if the publish interval is set to 60 sec, if first publish occurred at 60th sec and if device is power-cycled, at 70th sec, a rate limit error may occur as device is published twice within 60 sec.

 

 

Variable-Based Advanced Ladder Logic, IEC 61131, and Enhanced IEC

In the Variable-based Advanced Ladder Logic, IEC 61131 and Enhanced IEC programming languages, the OCS360 option is available in the Program Variable window. Select the check box to add the variable to OCS360 default group.

  1. Open Cscape.
  2. Navigate to the Project Toolbox (located on the Home tab in the ribbon).
  3. Select Program Variables to open the existing program variables.
  4. Select the OCS360 check box to add the variable to the OCS360 default group only.

Note: Because selecting the OCS360 check box only adds the variable to the default group, to add variables to other groups the user must create the variable and select that in the required group.

 

 

  1. Navigate to the Project Navigator (located on the Home tab in the ribbon).
  2. From the Project Navigator menu tree, expand Networking and select OCS360 to open the OCS360 configuration window and adjust the OCS360 Configuration settings as needed.

 

 

  1. From Cscape10.1SP1, Prime/CANVAS Firmware 17:20, In the OCS360 configuration dialog, user must provide the account ID of the tenant account to which device should get connected. The user can manually enter the account ID, or if the user is logged into Cscape, then click on “Get Account ID from server” to fetch the account ID.

    See Add-Device.htm

OCS360 Status Information in the Controller

The controller provides status information about device connectivity, total number of published messages, subscribed messages and more in consecutive 53 registers/variables. The status information is updated in %SR362 to %SR368 Registers.

Note: OCS360 Status information for IEC and Enhanced IEC programs are available in the user configured variable under MQTT configuration dialog > Status block.

Control Register %SR362: Control Register

OCS360 status information in %SR362 is available only for register-based and variable-based programs.

16 Bit Read/write

Bit Numbers Value Value Description
Bit 1 0 Disable OCS360 broker connection
Bit 1 1

Set high to enable OCS360 broker connection.

(Enabled by default)

Bit 2 1 Set high to clear publish message count. The bit resets to zero automatically after clearing the publish message count
Bit 3 1 Set high to clear received message count. The bit resets to zero automatically after clearing the receive message count.
Bit 4 1

Set high to clear internally stored certificates/Keys. The bit resets to zero automatically after clearing certificates/keys.

Note: Not recommended to erase the certificates stored in device.

Bit 5 1

Set high to retry certificate/key fetch if there is a fail while fetching from the certificate server.

A maximum of 3 retries is made after every set. The bit resets to 0 automatically after retrying 3 times.

Note: On power up of controller there are only 3 retries for certificate server connection fail or fail response from server.

Bit 6 1 Set high to retry if cloud server (MQTT broker) connect fails due to certificate or authentication error. A maximum of 3 retries are made after each set. The bit resets to 0 automatically after retrying 3 times.
Bit 7 1 Include Timestamp in OCS360 payload
Bit 8-15   Reserved

 

Control Register %SR363-364:

The following applies to all rows in the following table.

Description: Certificate Status

Data Type: 32 Bit Read Only

Note: Contact Technical Support if the following solutions do not resolve the issue.

 

Bit Number Value / Description Potential Error Reasons Suggestions
Bit 1   1 - Not connected   Internet is not functioning

- Check the OCS Ethernet or Wi-Fi connectivity

- Confirm the network gateway and DNS sever IPs are entered and correct

  OCS360 enable bit %SR362.1 is set to Low Set %SR362.1 to HIGH
  OCS RTC time is not valid Set OCS with current RTC date and time
  OCS360 device is in DEACTIVATED Mode Reactive the OCS360 device.
  The rate limit has been reached Confirm that the number of tags publishing to the server or subscribing to the server is within the selected plan limit.
  The OCS is in Stop Mode Set OCS to Run Mode.
    Check other bit values and refer to suggestions
  0 - Device successfully connected to cloud server (OCS360 Broker)    
       
Bit 2 1 - CA (Certificate Authority) certificate is not available OCS device does not have the required certificated files. Confirm that the MAC ID of the device that has been added in the server matches the OCS MACID
 

- Power cycle the OCS to retry for certificates.

- Confirm the control bit %SR362.5 is set to HIGH. If not, set to HIGH and try again

 
 

- Check the OCS Ethernet or Wi-Fi connectivity

- Confirm the network gateway and DNS sever IPs are entered and correct

 
  Internet is not functioning

- Check the OCS Ethernet or Wi-Fi connectivity

- Confirm the network gateway and DNS sever IPs are entered and correct

  DNS /network gateway IP is/are not configured correctly

Confirm the OCS device DNS /network gateway configuration in the Ethernet settings.

Note that the “DHCP” option can be enabled to automatically configured the gateway and DNS/network gateway IPs to OCS.

0 - CA (Certificate Authority) certificate is available    
       
Bit 3 1 - CLIENT certificate is not available See Bit 2  
0 - CLIENT certificate is available    
       
Bit 4 1 - Key is not available See Bit 2 0 - Key is not available
0 - Key is available    
       
Bit 5 0 - No error    
1- Could not resolve DNS while connecting certificate server DNS /network gateway IP is/are not configured correctly

Confirm the OCS device DNS /network gateway configuration in the Ethernet settings.

Note that the “DHCP” option can be enabled to automatically configured the gateway and DNS/network gateway IPs to OCS.

       
Bit 6 0 - No Error    
1 - Cannot connect to certificate server Server is not functioning correctly for any reason

Wait for a brief period then retry certificate fetch.

       
Bit 7 0 - No Error    
1 - server responds "Certificate for device not found." Device has not been added in the OCS360 server Check if the device is added in the server. Add it, if not.
    Confirm that the MAC ID of the device that has been added in the server matches the OCS MACID
       
Bit 8 0 - No Error    
1 - Certificate server response with 'Not authorized'   Requires Technical Support assistance
       
Bit 9 0 - No Error    
1 - Certificate server response "Device does not have a license or is not activated yet." Device has not been added in the OCS360 server Check if the device is added in the server. Add it, if not.
    Confirm that the MAC ID of the device that has been added in the server matches the OCS MACID
       
Bit 10 0 - No Error    
1 - Certificate server response of 'Internal server error'   Requires Technical Support assistance
       
Bit 11 0 - No Error    
1 - Received certificate / key payload is not in proper / correct format / parse error Certificates received from server is not in correct format

- Erase the certificates in the device using control bit %SR362.4.

- Retry to fetch the certificates using control Bit %SR362.5

       
Bit 12 0 - No Error    
1 - Still waiting for certificate / key from server Indicates device is waiting to receive the certificate from the server The bit will be cleared if the certificates are fetched. If there is any error, refer to the corresponding error bit information.
       
Bit 13 0 - No Error    
1 - Certificate server connection timeout Internet is not functioning correctly

- Check the OCS Ethernet or Wi-Fi connectivity

- Confirm the network gateway and DNS sever IPs are entered and correct

  Server is not functioning correctly Wait a few minutes and retry the certificate fetch. If this does not succeed, contact Technical Support assistance
       
Bit 14 0 - No Error    
1 - TLS fail while connecting cloud server (Broker)  

- Check the OCS Ethernet or Wi-Fi connectivity

- Confirm the network gateway and DNS sever IPs are entered and correct

       
Bit 15 0 - No Error    
1 - TLS fail while connecting cloud server (Broker) Certificate received from server is incorrect

- Delete the certificates in the device using control bit %SR362.4

- Retry to fetch the certificates using control Bit %SR362.5

       
Bit 16 0 - No Error    
1 - Authentication error while connecting cloud server (Broker)   Requires Technical Support assistance
       
Bit 17 0 - No Error    
1 - Other errors while connecting cloud server (Broker)   Requires Technical Support assistance
       
Bit 18 0 - No Error    
1 - Last publish fail to cloud server (Broker) Internet is not functioning correctly

- Check the OCS Ethernet or Wi-Fi connectivity

- Confirm the network gateway and DNS sever IPs are entered and correct

       
Bit 19 0 - No Error    
1 - Connection Refused: Authorization error   Requires Technical Support assistance
       
Bit 20 0 - No Error    
1 - Connection Refused: Unknown error   Requires Technical Support assistance
       
Bit 21 1 - Invalid OCS360 configuration OCS360 configuration downloaded from Cscape is not valid. Requires Technical Support assistance
0 - Valid OCS360 configuration    
 

 

Control Register %SR365-366: Publish Count

Data TypeValue Description
32 BitTotal count of published message

 

Control Register %SR367-368: Receive Count

Data TypeValue Description
32 BitTotal count of received (subscribed) message

 

 

OCS360 Status Information for IEC and Enhanced IEC Programs

OCS360 status information for IEC and Enhanced IEC programs are available in the user configured variable under MQTT configuration dialog > Status block.

 

 

IEC and Enhanced IEC Status Additional Details

Note: Click on the image to view the example.

 

Example: If a status block is configured with variables OCS360_status with dimension 53 then the status information will appear as follows.

 

 

OCS360_status [0]: General Status (16 bit)

 

 

Example: OCS360_Status [1]: Each client status (16bit x 8)

Note: 'x' is number of clients configured from 1 to 8

 

 

Example: OCS360_Status [9]: (32bit)

 

 

Example: OCS360_Status [11]: (32bit)

 

 

Example: OCS360_Status [13]: Each client message counts (80bits x 8)

Note: 'x' is number of clients configured from 1 to 8