Knowledge Base
cancel
Showing results for 
Search instead for 
Did you mean: 

Using the Save command in Plain English programs.

Issue

When the Save statement is used to save objects in a BCX4040 to the database.


Steps to reproduce problem:
1. Create an InfinityString object (Test.Str) with a manual array size of 1 in a BCX4040.
2. Create a program in the BCX that sets the value of Test.Str[1] to 'Success'
3. From command line, print the value of Test.Str[1] while the workstation is in OnLine mode. The value should = 'Success'

4. From command line, print the value of Test.Str[1] while the workstation is in Offline mode.  No value should be returned as the value has not been updated in the database.

5. Create a fallthrough/autostart  prigram in the workstation with the following code...

 

                FIRSTLINE:

                                Save \TestNet\TestACX\Test.Str -0

                                Goto StopLine

                                

                STOPLINE:

                                Stop

 

6. From command line, print the value of Test.Str[1] while the workstation is in Offline mode.  The value should now = 'Success'. 


Expected result:

The value returned for Test.Str when the workstation is in Offline mode (Database value) should 'equal the value returned when the workstation is in Online mode (Live Value), i.e. = Success'

Actual result:
The Offline value of Test.Str[1] does not change and does not equal the value live value.
The resulting ACC__Dump_Debug that is produced is found to have no contents.


Workaround:

When a manual Save to Database done on the object, the database value is updated with the current Live value.

Environment

Continuum 

Plain English

Cause

The following Plain English code does not accomplish a Save to Database.

  FIRSTLINE:

                                Save \TestNet\TestACX\Test.Str -0

                                Goto StopLine

Resolution

The functionality of the Save command is not to perform a "Save to Database" operation. This is a FAD.
The Save command, which is equivalent to the Dump command, dumps the contents of the passed-in arguments (i.e. objects) to a file if provided

Tags (1)
Labels (1)
Version history
Revision #:
1 of 1
Last update:
‎2018-09-06 07:34 AM
Updated by: