SCADA Client API Command not Working

Forum Home Forums Understanding the Software SCADA Client API Command not Working

Viewing 15 posts - 1 through 15 (of 19 total)
  • Author
    Posts
  • #18062

    Rapid SCADA Test Client
    Server is ready = True
    User is logged in = True

    Connected to localhost
    Session ID = 682001045626589992
    Server name = Server 6.2.2.1

    Select action:
    0 – exit
    1 – get status
    2 – terminate session
    *** File Operations ***
    3 – get file info
    4 – download file
    5 – upload file
    *** Access Archive ***
    6 – get current data
    7 – get trend
    8 – get timestamps
    9 – get slice
    10 – get last write time
    11 – write current data
    12 – write historical data
    *** Access Events ***
    13 – get event by ID
    14 – get events
    15 – write event
    16 – acknowledge event
    *** Commands ***
    17 – send command
    18 – get command
    17
    Enter channel number: 104
    Enter command value: 1
    Command sent successfully

    Select action:
    0 – exit
    1 – get status
    2 – terminate session
    *** File Operations ***
    3 – get file info
    4 – download file
    5 – upload file
    *** Access Archive ***
    6 – get current data
    7 – get trend
    8 – get timestamps
    9 – get slice
    10 – get last write time
    11 – write current data
    12 – write historical data
    *** Access Events ***
    13 – get event by ID
    14 – get events
    15 – write event
    16 – acknowledge event
    *** Commands ***
    17 – send command
    18 – get command
    6
    Enter channel number: 104
    Channel data = 0 (0)
    Channel list ID = 7644628203401034737

    Select action:
    0 – exit
    1 – get status
    2 – terminate session
    *** File Operations ***
    3 – get file info
    4 – download file
    5 – upload file
    *** Access Archive ***
    6 – get current data
    7 – get trend
    8 – get timestamps
    9 – get slice
    10 – get last write time
    11 – write current data
    12 – write historical data
    *** Access Events ***
    13 – get event by ID
    14 – get events
    15 – write event
    16 – acknowledge event
    *** Commands ***
    17 – send command
    18 – get command

    Source Code :

    https://drive.google.com/file/d/1fS5HAM9HH_c6ca1He9L2uYQ_ruhAhn0Z/view?usp=sharing

    • This topic was modified 1 month, 2 weeks ago by Mikhail.
    #18063
    #18064

    Exe Files

    #18065

    Hi Team,

    I am testing command write functionality using the Rapid SCADA Test Client.

    Environment:

    * Rapid SCADA Server Version: 6.2.2.1
    * Connected successfully to localhost
    * User login successful

    Test performed:

    1. Selected “Send Command” (Option 17)
    2. Channel Number: 104
    3. Command Value: 1

    Result:

    * Test Client response: “Command sent successfully”

    However, when I read the channel value afterward using “Get Current Data” (Option 6), the channel value remains 0 and the command does not appear to be executed by my driver.

    Test Client Output:

    * Channel: 104
    * Command Value Sent: 1
    * Response: Command sent successfully
    * Current Channel Value after command: 0

    Could you please guide me on the following points?

    1. How should an external application/API send commands to this driver?
    2. Which Rapid SCADA server API should be used for command write operations?
    3. Does the driver need to implement a specific command handling interface or method to receive commands?
    4. Is there any configuration required in Communicator, Server, or Webstation to enable command forwarding?
    5. How can I verify whether the command reaches the driver but is not processed?

    Any sample code or API documentation for writing commands from an external application would be greatly appreciated.

    Regards,

    Prabhu N

    #18068
    Mikhail
    Moderator

    Hi,

    You should check all steps how a command is transferred.
    Check ScadaServer.log, then ScadaComm.log, then the communication line log.
    Log files provide additional details that can help to resolve the issue.

    There is also a GUI client.

    Does the driver need to implement a specific command handling interface or method to receive commands?

    Is it your own custom driver or some of the existing drivers?

    #18069

    Is it your own custom driver or some of the existing drivers?

    Ans: it is simulated device and sample project from installation folder

    #18071
    2026-06-22 18:17:48 [ENGINEERING][ENGINEERING$][ACT] Delete outdated data from the Events archive older than 22/06/2025
    2026-06-22 18:17:51 [ENGINEERING][ENGINEERING$][ACT] Session with ID 7890597929073407682 created
    2026-06-22 18:17:51 [ENGINEERING][ENGINEERING$][ACT] Client 127.0.0.1 connected
    2026-06-22 18:17:51 [ENGINEERING][ENGINEERING$][ACT] User ScadaComm is successfully authenticated
    2026-06-22 18:17:53 [ENGINEERING][ENGINEERING$][ACT] Client 127.0.0.1 disconnected
    2026-06-22 18:17:54 [ENGINEERING][ENGINEERING$][ACT] Session with ID -6828743871651050153 created
    2026-06-22 18:17:54 [ENGINEERING][ENGINEERING$][ACT] Client 127.0.0.1 connected
    2026-06-22 18:17:54 [ENGINEERING][ENGINEERING$][ACT] User ScadaComm is successfully authenticated
    2026-06-22 18:18:22 [ENGINEERING][ENGINEERING$][ACT] Session with ID 1116548718686851889 created
    2026-06-22 18:18:22 [ENGINEERING][ENGINEERING$][ACT] Client 127.0.0.1 connected
    2026-06-22 18:18:22 [ENGINEERING][ENGINEERING$][ACT] User ScadaWeb is successfully authenticated
    2026-06-22 18:18:23 [ENGINEERING][ENGINEERING$][ACT] Client 127.0.0.1 disconnected
    2026-06-22 18:18:27 [ENGINEERING][ENGINEERING$][ACT] Session with ID -6790403651749003545 created
    2026-06-22 18:18:27 [ENGINEERING][ENGINEERING$][ACT] Client 127.0.0.1 connected
    2026-06-22 18:18:27 [ENGINEERING][ENGINEERING$][ACT] User ScadaWeb is successfully authenticated
    2026-06-22 18:18:27 [ENGINEERING][ENGINEERING$][ACT] Checking username and password for user admin is successful
    2026-06-22 18:18:30 [ENGINEERING][ENGINEERING$][ACT] Session with ID -1590437787900415357 created
    2026-06-22 18:18:30 [ENGINEERING][ENGINEERING$][ACT] Client 127.0.0.1 connected
    2026-06-22 18:18:30 [ENGINEERING][ENGINEERING$][ACT] User ScadaWeb is successfully authenticated
    2026-06-22 18:18:38 [ENGINEERING][ENGINEERING$][ACT] Session with ID -2811313689489181496 created
    2026-06-22 18:18:38 [ENGINEERING][ENGINEERING$][ACT] Client 127.0.0.1 connected
    2026-06-22 18:18:38 [ENGINEERING][ENGINEERING$][ACT] User ScadaWeb is successfully authenticated
    2026-06-22 18:18:43 [ENGINEERING][ENGINEERING$][ACT] Session with ID -7443385097074684453 created
    2026-06-22 18:18:43 [ENGINEERING][ENGINEERING$][ACT] Client 127.0.0.1 connected
    2026-06-22 18:18:43 [ENGINEERING][ENGINEERING$][ACT] User ScadaComm is successfully authenticated
    2026-06-22 18:19:44 [ENGINEERING][ENGINEERING$][ACT] Client 127.0.0.1 disconnected
    2026-06-22 18:19:48 [ENGINEERING][ENGINEERING$][ACT] Session with ID -1883278712925751425 created
    2026-06-22 18:19:48 [ENGINEERING][ENGINEERING$][ACT] Client 127.0.0.1 connected
    2026-06-22 18:19:49 [ENGINEERING][ENGINEERING$][ACT] User ScadaComm is successfully authenticated
    2026-06-22 18:19:49 [ENGINEERING][ENGINEERING$][ACT] Command to channel 104 from user with ID 2
    2026-06-22 18:19:49 [ENGINEERING][ENGINEERING$][ACT] Command is queued to be sent to clients
    2026-06-22 18:20:47 [ENGINEERING][ENGINEERING$][ACT] Command to channel 104 from user with ID 2
    2026-06-22 18:20:47 [ENGINEERING][ENGINEERING$][ACT] Command is queued to be sent to clients
    2026-06-22 18:22:16 [ENGINEERING][ENGINEERING$][ACT] Client 127.0.0.1 disconnected
    2026-06-22 18:24:41 [ENGINEERING][ENGINEERING$][ACT] Session with ID 5517713182009599264 created
    2026-06-22 18:24:41 [ENGINEERING][ENGINEERING$][ACT] Client 127.0.0.1 connected
    2026-06-22 18:24:41 [ENGINEERING][ENGINEERING$][ACT] User ScadaComm is successfully authenticated
    2026-06-22 18:25:43 [ENGINEERING][ENGINEERING$][ACT] Client 127.0.0.1 disconnected
    2026-06-22 18:29:38 [ENGINEERING][ENGINEERING$][ACT] Session with ID 9109001899454119379 created
    2026-06-22 18:29:38 [ENGINEERING][ENGINEERING$][ACT] Client 127.0.0.1 connected
    2026-06-22 18:29:38 [ENGINEERING][ENGINEERING$][ACT] User ScadaComm is successfully authenticated
    2026-06-22 18:29:38 [ENGINEERING][ENGINEERING$][ACT] Command to channel 105 from user with ID 2
    2026-06-22 18:29:38 [ENGINEERING][ENGINEERING$][ACT] Command is queued to be sent to clients
    2026-06-22 18:30:49 [ENGINEERING][ENGINEERING$][ACT] Command to channel 105 from user with ID 2
    2026-06-22 18:30:50 [ENGINEERING][ENGINEERING$][ACT] Command is queued to be sent to clients
    2026-06-22 18:30:55 [ENGINEERING][ENGINEERING$][ACT] Command to channel 105 from user with ID 2
    2026-06-22 18:30:55 [ENGINEERING][ENGINEERING$][ACT] Command is queued to be sent to clients
    

    Not updated in SCADA Channel Value

    • This reply was modified 1 month, 2 weeks ago by Mikhail.
    #18074
    Mikhail
    Moderator

    Hi,
    Then check ScadaComm.log if a command registered there or not.

    #18076

    Hi Team,

    I checked the logs and found that no command is being logged when the command is sent from the GUI.

    However, the command is logged correctly when it is issued from the Web UI (http://127.0.0.1:10008).

    Could you please check why GUI-generated commands are not being recorded in the command log?

    Thanks,
    Prabhu

    #18080
    Mikhail
    Moderator

    Hi,
    If you mean commands sent from the Administrator application, you should find them in ScadaComm.log

    #18081
    Mikhail
    Moderator

    Make sure that file commands are enabled in the Communicator options.

    #18082

    <?xml version=”1.0″ encoding=”utf-8″?>
    <ScadaCommConfig>
    <GeneralOptions>
    <IsBound>true</IsBound>
    <SendModifiedData>true</SendModifiedData>
    <SendAllDataPeriod>60</SendAllDataPeriod>
    <EnableCommands>true</EnableCommands>
    <EnableFileCommands>true</EnableFileCommands>
    <StartLinesOnCommand>false</StartLinesOnCommand>
    <StopWait>10</StopWait>
    <MaxLogSize>1</MaxLogSize>
    </GeneralOptions>
    <ConnectionOptions>
    <Name>Default Connection</Name>
    <Host>localhost</Host>
    <Port>10000</Port>
    <Username>ScadaComm</Username>
    <Password>B9D0F030265751578B00E9801C69320C</Password>
    <Timeout>10000</Timeout>
    <SecretKey>0E063D581B1DB27B8E984993DED65CE99284A706756C706C7F3B12C44BD55D4D</SecretKey>
    </ConnectionOptions>
    <DataSources>
    <DataSource active=”true” code=”ScadaServer” name=”Server Data Source” driver=”DrvDsScadaServer”>
    <Option name=”ClientLogEnabled” value=”false” />
    <Option name=”Connection” value=”” />
    <Option name=”DataLifetime” value=”3600″ />
    <Option name=”DeviceFilter” value=”” />
    <Option name=”MaxQueueSize” value=”1000″ />
    <Option name=”ReadConfigDb” value=”true” />
    <Option name=”UseDefaultConn” value=”true” />
    </DataSource>
    <DataSource active=”false” code=”OpcUaServer” name=”OPC UA Server” driver=”DrvDsOpcUaServer”>
    <Option name=”AutoAccept” value=”false” />
    <Option name=”ConfigFileName” value=”” />
    <Option name=”DeviceFilter” value=”” />
    <Option name=”Password” value=”B9D0F030265751578B00E9801C69320C” />
    <Option name=”Username” value=”opc” />
    </DataSource>
    </DataSources>
    <Lines>
    <Line active=”true” isBound=”true” number=”1″ name=”My Line”>
    <LineOptions>
    <ReqRetries>3</ReqRetries>
    <CycleDelay>0</CycleDelay>
    <CmdEnabled>true</CmdEnabled>
    <PollAfterCmd>true</PollAfterCmd>
    <DetailedLog>true</DetailedLog>
    </LineOptions>
    <Channel type=”” driver=”” />
    <CustomOptions />
    <DevicePolling>
    <Device active=”true” isBound=”true” number=”1″ name=”Simulator” driver=”DrvSimulator” numAddress=”0″ strAddress=”” pollOnCmd=”false” timeout=”0″ delay=”1000″ time=”00:00:00″ period=”00:00:00″ cmdLine=”” />
    </DevicePolling>
    </Line>
    </Lines>
    </ScadaCommConfig>

    #18083

    Could you please check

    #18086
    Mikhail
    Moderator

    In the above config the EnableFileCommands parameter is true.
    So you should see commands in ScadaComm.log

    #18240

    Hi Mikhail,

    Thank you for checking.

    Yes, EnableFileCommands is set to true.

    Commands sent manually from the Rapid SCADA GUI are working correctly. However, I am still facing the same issue with GUI Tool.

    Could you please check what could cause file commands not to be processed even though EnableFileCommands=true, while the same commands work correctly when sent from the GUI?

    I will also check ScadaComm.log while triggering the file command and share the relevant log entries.

    Thanks,
    Prabhu

Viewing 15 posts - 1 through 15 (of 19 total)
  • You must be logged in to reply to this topic.