Type: BCS.Sym3.IDataSource
Represents a Datasource Remarks: Available in Operator and Integrator only
Properties
AutoConnect
- Description: Should this DataSource automatically try and connect?
- Type: Boolean
- Access: Read and Write
BaseProject
- Description: Gets the project
- Type: IBaseProject
- Access: Read
CCLinkChannelNumber
- Description: The number that identifies the CC Link card.
- Type: Int32
- Access: Read and Write
CCLinkForce32
- Description: When running in 64 bit, should we spawn a 32 bit host to communicate with MDFUNC32.DLL?
- Type: Boolean
- Access: Read and Write
CCLinkNetworkNumber
- Description: What network this data source should communicate with.
- Type: Int32
- Access: Read and Write
CCLinkRate
- Description: How often, in milliseconds, the data source should read and write.
- Type: Int32
- Access: Read and Write
CCLinkReadDeviceStart
- Description: The device number to start reading from.
- Type: Int32
- Access: Read and Write
CCLinkReadDeviceType
- Description: The Mitsubishi device type to read from.
- Type: Int32
- Access: Read and Write
CCLinkReadSize
- Description: The number of bytes to read.
- Type: Int32
- Access: Read and Write
CCLinkStationNumber
- Description: What station this data source should communicate with.
- Type: Int32
- Access: Read and Write
CCLinkWriteDeviceStart
- Description: The device number to start writing from.
- Type: Int32
- Access: Read and Write
CCLinkWriteDeviceType
- Description: The Mitsubishi device type to write to.
- Type: Int32
- Access: Read and Write
CCLinkWriteSize
- Description: The number of bytes to write.
- Type: Int32
- Access: Read and Write
CIPCPUType
- Description: Gets or sets cip cpu type (only when datasource type is CIP)
- Type: DataSourceCIPCPUTypeEnum
- Access: Read and Write
CIPReversePort
- Description: Get/Set the port that Sym3 will listening to when using a CIP Emulation DataSource. Value has to be between 1 and 65535
- Type: UInt16
- Access: Read and Write
Comment
- Description: Gets or sets datasource comment
- Type: String
- Access: Read and Write
DataSourceType
- Description: Gets or sets datasource type
- Type: DataSourceTypeEnum
- Access: Read and Write
- Example:
<code>
var datasource;
datasource.DataSourceType = BCS.Sym3.DataSourceTypeEnum.OPC_DA
</code>
var datasource;
datasource.DataSourceType = BCS.Sym3.DataSourceTypeEnum.OPC_DA
DisplayTypeName
- Description: Gets the display name of the type name of the object. It returns the english display name of the type name.
- Type: String
- Access: Read
EchoControllerGUID
- Description: The GUID associated with the controller that the Echo data source will connect to.
- Type: String
- Access: Read and Write
HostName
- Description: Gets or sets host name (only when datasource type is OPC_DA,CIP)
- Type: String
- Access: Read and Write
Id
- Description: Gets the globally unique identifier (GUID) id of the object. This unique identifier is generated once at the object creation. This id will be kept unique for the entire life of the object, event after saving/loading the project.
- Type: Guid
- Access: Read and Write
- Example:
This example shows how to get the id of an object in a string format. The following script will output a string like 'b3122ae0-dcf7-43b6-b17c-5381afaca5cb'
strid = Project.Colors.Get("myColor").Id.ToString();
print(strid)
MCDoNotWriteInputTags
- Description: flag to prevent the Mitsubishi data source from writing input tags to the PLC
- Type: Boolean
- Access: Read and Write
MCFrameTypeEnum
- Description: Gets/Sets the protocol used to comunicate with a Mitsubishi datasource
- Type: MCFrameTypeEnum
- Access: Read and Write
MCProfilingData
- Description: Gets the profiling string data (XML format). This string is populated only if profiling is enabled (see ‘MCProfilingEnabled’ property).
- Type: String
- Access: Read
MCProfilingEnabled
- Description: Enable/Disable profiling for Mitsubishi datasource. When enabled, get the string “MCProfilingData” that will contain profiling data (XML format)
- Type: Boolean
- Access: Read and Write
MCReadAndWriteRateInMs
- Description: Get/Set the rate in milliseconds for Mitsubishi datasource (when using one timer that alternate READ, WRITE, READ, WRITE etc…)
- Type: Int32
- Access: Read and Write
MCReadRateInMs
- Description: Get/Set the Reading rate in milliseconds for Mitsubishi datasource
- Type: UInt32
- Access: Read and Write
MCReverseIP
- Description: Get/Set the ip address that Sym3 will listening to when using a MC Emulation DataSource. Value has to be empty or valid IP address
- Type: String
- Access: Read and Write
MCReversePort
- Description: Get/Set the port that Sym3 will listening to when using a MC Emulation DataSource. Value has to be between 1 and 65535
- Type: UInt16
- Access: Read and Write
MCWriteRateInMs
- Description: Get/Set the Writing rate in milliseconds for Mitsubishi datasource
- Type: UInt32
- Access: Read and Write
Name
- Description: Gets or sets the name of the object. All objects of the same type have a unique name.
- Type: String
- Access: Read and Write
- Example:
This example shows how to get and set the name of an object.
// get the color name
colorname = Project.Colors.Get("myColor").Name;
// set the color name
Project.Colors.Get("myColor").Name = "myNewName";
NameSuffix
- Description: The project explorer will display this after the Name of this object.
- Type: String
- Access: Read
Path
- Description: Gets or sets CIP Path (example: 1.0)
- Type: String
- Access: Read and Write
ServerEndpointUrl
- Description: OPC UA Properties
- Type: String
- Access: Read and Write
ServerId
- Description: Gets or sets server id (only when datasource type is OPC_DA)
- Type: String
- Access: Read and Write
SNMPRequestRateInMs
- Description: Get/Set the request rate in milliseconds for SNMP datasource
- Type: Int32
- Access: Read and Write
SNMPTagsPerRequest
- Description: Get/Set the number of tag to add in one SNMP request. Value has to be between 1 and 25
- Type: UInt16
- Access: Read and Write
SubSystem
- Description: Gets or sets the Sub System
- Type: ISubSystem
- Access: Read and Write
TypeName
- Description: Gets the typename of the object. A type name doesn’t contain any space characters.
- Type: String
- Access: Read
UserPropertyInstances
- Description: Gets a list of all the instances of user properties.
- Type: ObservableCollection`1
- Access: Read
Methods
ForceRename(System.String,System.Boolean)
Rename the object.
- Parameters:
- value: The new name.
- fireChangingEvent: If false, no change event will fire. In
particular, this disables the check for duplicate names, which can be
costly as it has to check every equipment. The caller is responsible
for ensuring that
value
is a unique name, or Bad Things will happen.
FromXmlString(BCS.IToolXmlToObjectHelper)
Init object from IToolXmlToObjectHelper. All properties found in the RootElement of IToolXmlToObjectHelper will be set with the value in the rootElement
- Parameters:
- xmlHelperObj: xmlHelperObj IToolXmlToObjectHelper
FromXmlString(System.String)
Init object from xml. All properties found in the xml will be set with the value in the xml file
- Parameters:
- xmlText: Xml string
FromXmlString(System.Xml.Linq.XElement)
Init object from root element. All properties found in the XElement will be set with the value in the XElement
- Parameters:
- objXml: objXml XElement
GetCopyPasteXml
Converts the object into an XML string including overrides for for copy/paste functionality
- Returns:
- the string that contains xml version of the object for copy/paste
GetUserPropertyInstance(System.String)
Gets the user property instance of the specified name
- Parameters:
- userPropertyName: The user property name.
- Returns:
- Returns the user property instance object. If not found, the methods returns null.
- Example:
This example shows how to set the value of a user property by using this method
cc1 = Project.Equipment.Get("CC1");
// get the value of a user property using the method
userPropertyInstance = cc1.GetUserPropertyInstance("UserProperty1");
if(userPropertyInstance != null) {
userPropertyInstance.Value = 3;
}
GetUserPropertyValue(System.String)
Gets the value of a user property. A better way to get the value of a user property is to use the indexer operator [], see example. Instead of using the method ‘GetUserPropertyInstance’ and then access the ‘Value’ property of the returned value, this method simplifies the way we get the value of a user property.
- Parameters:
- userPropertyName: The name of the user property to set.
- Returns:
- Returns null if user property is not found. Otherwise returns the value of the user property.
- Example:
This example shows how to get the value of a user property using this method and also by using the indexer
cc1 = Project.Equipment.Get("CC1");
// get the value of a user property using the method
val = cc1.GetUserPropertyValue("UserProperty1");
// get the value of a user property using the indexer operator
val = cc1["UserProperty1"];
IsUserProperty(System.String)
Indicates if the object contains a user property with the name you specify
- Parameters:
- userPropertyName: user property name
- Returns:
- Returns true if the object contains a user property with the name you specified in parameter.
SetUserPropertyValue(System.String,System.Object)
Sets the value of a user property. A better way to set the value of a user property is to use the indexer operator [], see example. Instead of using the method ‘GetUserPropertyInstance’ and then access the ‘Value’ property of the returned value, this method simplifies the way we set the value of a user property.
- Parameters:
- userPropertyName: The name of the user property to set.
- value: If the user property is not found, this methods does nothing.
- Example:
This example shows how to set the value of a user property using this method and also by using the indexer
cc1 = Project.Equipment.Get("CC1");
// set the value of a user property using the method
cc1.SetUserPropertyValue("UserProperty1", 3);
// set the value of a user property using the indexer operator
cc1["UserProperty1"] = 3;
ToCSVString(System.Char)
Returns the object in a CSV string.
- Returns:
- A string that contains properties of the object in a CSV format.
ToXmlString
Converts the object in an xml string
- Returns:
- the string that contains xml version of the object