FANUC America PCDK Support Documentation ©2017 FANUC America Corporation All Rights Reserved. This publication contains proprietary information of FANUC America Corporation furnished for customer use only. No other uses are authorized without the express written permission of FANUC America Corporation. FANUC America Corporation 3900 W. Hamlin Road Rochester Hills, Michigan 48309–3253 Table of Contents Robot Server Overview ...................................................................................................................................................................... 7 Using the Robot Object Interface.................................................................................................................................................... 7 Connection Performance Tips..................................................................................................................................................... 7 Working with Variables ................................................................................................................................................................... 7 Reading and Changing Variables ............................................................................................................................................... 7 Working with I/O............................................................................................................................................................................. 8 Monitoring I/O ............................................................................................................................................................................. 8 Reading and Changing Position Variables ..................................................................................................................................... 9 Checking Reachability ................................................................................................................................................................ 9 Using Pipes for High Performance Data Acquisition ....................................................................................................................... 9 Activating a Pipe ......................................................................................................................................................................... 9 Handling Errors ............................................................................................................................................................................ 10 FRCRobotErrorInfo ................................................................................................................................................................... 10 Robot Neighborhood Overview ........................................................................................................................................................ 11 Working With the Robot Neighborhood Structure ......................................................................................................................... 11 Populating the Robot Neighborhood ......................................................................................................................................... 11 Robot Object Interface ..................................................................................................................................................................... 13 Robot ........................................................................................................................................................................................... 13 FRCRobot ................................................................................................................................................................................ 13 FRELanguageConstants........................................................................................................................................................... 16 FRERemoteMotionMasterConstants......................................................................................................................................... 17 FRERobotErrors ....................................................................................................................................................................... 17 FRESaveOptionConstants ........................................................................................................................................................ 22 Programs ..................................................................................................................................................................................... 23 FRCProgram ............................................................................................................................................................................ 23 FRCPrograms........................................................................................................................................................................... 26 FRCTPProgram ........................................................................................................................................................................ 31 FREAttributeConstants ............................................................................................................................................................. 32 FREAccessModeConstants ...................................................................................................................................................... 33 FREProgramTypeConstants ..................................................................................................................................................... 34 FREProtectionConstants .......................................................................................................................................................... 34 FRERejectModeConstants ....................................................................................................................................................... 34 FRETPSubTypeConstants........................................................................................................................................................ 35 Tasks ........................................................................................................................................................................................... 36 FRCTask .................................................................................................................................................................................. 36 FRCTasks ................................................................................................................................................................................ 42 FREExecuteConstants ............................................................................................................................................................. 43 FREHoldConditionConstants .................................................................................................................................................... 44 FREStepTypeConstants ........................................................................................................................................................... 46 FRETaskAttributeConstants ..................................................................................................................................................... 46 Variables ...................................................................................................................................................................................... 50 FRCCommonAssoc .................................................................................................................................................................. 50 FRCRegNumeric ...................................................................................................................................................................... 51 FRCRegString Object Properties .............................................................................................................................................. 52 FRCVar .................................................................................................................................................................................... 53 FRCVars................................................................................................................................................................................... 62 FRESaveClassConstants ......................................................................................................................................................... 68 FRETypeCodeConstants .......................................................................................................................................................... 69 Positions ...................................................................................................................................................................................... 71 FRCAxesCollection................................................................................................................................................................... 71 FRCConfig................................................................................................................................................................................ 72 FRCCurGroupPosition .............................................................................................................................................................. 73 FRCCurPosition........................................................................................................................................................................ 75 FRCGroupPosition ................................................................................................................................................................... 77 FRCIndGroupPosition............................................................................................................................................................... 78 FRCIndPosition ........................................................................................................................................................................ 80 FRCJoint .................................................................................................................................................................................. 81 FRCMotionErrorInfo.................................................................................................................................................................. 82 FRCPosition ............................................................................................................................................................................. 83 FRCSysGroupPosition.............................................................................................................................................................. 90 FRCSysPosition ....................................................................................................................................................................... 92 FRCSysPositions...................................................................................................................................................................... 94 FRCTPPosition ......................................................................................................................................................................... 98 FRCTPPositions ..................................................................................................................................................................... 100 FRCTransform ........................................................................................................................................................................ 102 FRECurPositionConstants ...................................................................................................................................................... 102 FREOrientTypeConstants ....................................................................................................................................................... 103 Alarms........................................................................................................................................................................................ 103 FRCAlarm............................................................................................................................................................................... 103 FRCAlarms ............................................................................................................................................................................. 107 FREAlarmSeverity Constants ................................................................................................................................................. 108 I/O .............................................................................................................................................................................................. 112 FRCIOConfig .......................................................................................................................................................................... 112 FRCIOConfigs ........................................................................................................................................................................ 114 FRCxxxIOSignal ..................................................................................................................................................................... 117 FRCIOSignals......................................................................................................................................................................... 138 FRCxxxIOType ....................................................................................................................................................................... 141 FRCIOTypes .......................................................................................................................................................................... 164 FREIOTypeConstants............................................................................................................................................................. 164 FRETPOutSignalConstants .................................................................................................................................................... 167 Packet Events ............................................................................................................................................................................ 167 FREPacketEventConstants .................................................................................................................................................... 167 Pipes.......................................................................................................................................................................................... 168 FRCPipes ............................................................................................................................................................................... 168 FRCPipe ................................................................................................................................................................................. 169 FRCPipeFields ....................................................................................................................................................................... 170 FRCPipeField ......................................................................................................................................................................... 172 FREPipeStateConstants ......................................................................................................................................................... 174 Scattered Access ....................................................................................................................................................................... 174 FRCScatteredAccess Object Overview ................................................................................................................................... 175 FRCScatteredAccess Methods ............................................................................................................................................... 175 Applications ............................................................................................................................................................................... 178 FRCApplications Object Overview .......................................................................................................................................... 178 FRCApplications Properties .................................................................................................................................................... 179 FRCApplications Methods ...................................................................................................................................................... 180 System Information .................................................................................................................................................................... 180 FRCFeature............................................................................................................................................................................ 180 FRCFeatures .......................................................................................................................................................................... 181 FRCSynchData....................................................................................................................................................................... 181 FRCSysInfo ............................................................................................................................................................................ 182 FREStartModeConstants ........................................................................................................................................................ 192 Robot Neighborhood Object Interface ............................................................................................................................................ 195 FRCRobotNeighborhood ............................................................................................................................................................ 195 FRCRobot Neighborhood Properties ...................................................................................................................................... 195 FRCRNRobots ........................................................................................................................................................................... 196 FRCRNRobots Properties....................................................................................................................................................... 196 FRCRNRobot ............................................................................................................................................................................. 198 FRCRNRobot Properties ........................................................................................................................................................ 198 FRCRNVirtualRobot ................................................................................................................................................................... 200 FRCRNVirtualRobot Methods ................................................................................................................................................. 200 FRCRNRDMResponses............................................................................................................................................................. 202 FRCRNRDMResponses Properties ........................................................................................................................................ 202 FRCRNRDMResponses Methods ........................................................................................................................................... 203 FRCRNServices ......................................................................................................................................................................... 203 FRCRNServices Properties .................................................................................................................................................... 203 FRCRNService .......................................................................................................................................................................... 204 FRCRNService Object Overview ............................................................................................................................................ 204 FRCRNService Properties ...................................................................................................................................................... 205 FRCRNService Events ........................................................................................................................................................... 205 FRURNSelect ............................................................................................................................................................................ 206 FRURNSelect Properties ........................................................................................................................................................ 206 Constant Enumerations .............................................................................................................................................................. 206 FRERNErrorConstants ........................................................................................................................................................... 206 FRERNServiceIDConstants .................................................................................................................................................... 207 FRERNServiceStateConstants ............................................................................................................................................... 208 FRERNStartModeConstants ................................................................................................................................................... 208 FRERNRDMFlagConstants .................................................................................................................................................... 209 Optimizing Data Access ................................................................................................................................................................. 213 Optimizing Data Access ............................................................................................................................................................. 213 Optimizing Variable Access ........................................................................................................................................................ 213 Special Variable Types ........................................................................................................................................................... 213 Scattered Access ....................................................................................................................................................................... 214 Scattered Access Overview .................................................................................................................................................... 214 KAREL Builtins .............................................................................................................................................................................. 217 Robot-PC Communication KAREL Built-ins ................................................................................................................................ 217 PacketEvent KAREL Built-Ins..................................................................................................................................................... 217 SEND_DATAPC Built-In ......................................................................................................................................................... 217 ADD_REALPC Built-In............................................................................................................................................................ 218 Data Acquisition KAREL Build-Ins .............................................................................................................................................. 219 DAQ_CHECKP Built-In ........................................................................................................................................................... 219 DAQ_WRITE Built-In .............................................................................................................................................................. 220 DAQ_STOP Built-In ................................................................................................................................................................ 221 DAQ_UNREG Built-In ............................................................................................................................................................. 222 TPP Macros................................................................................................................................................................................... 225 Send Data() Macro ..................................................................................................................................................................... 225 Using FTP ..................................................................................................................................................................................... 227 Starting an Internet Session ....................................................................................................................................................... 227 Reading a File Directory into a Collection ................................................................................................................................... 228 Legacy Support ............................................................................................................................................................................. 233 Robot Manager Overview........................................................................................................................................................... 233 Managing Connections ........................................................................................................................................................... 233 Special Features..................................................................................................................................................................... 235 Robot Manager Object Interface ................................................................................................................................................ 236 RobotManager ........................................................................................................................................................................ 236 Connections ........................................................................................................................................................................... 237 Limitations.................................................................................................................................................................................. 243 FRCAxesCollection is not updated when extended axes added .............................................................................................. 243 Problems loading invisible programs over visible & vice versa ................................................................................................ 244 Index ............................................................................................................................................................................................. 245 Robot Server Overview Using the Robot Object Interface Connection Performance Tips Use the Robot Neighborhood Error! Hyperlink reference not valid. for most efficient handling of the robot connection. It allows you to: Share a connection with several applications Monitor the health of the Ethernet connection Re-establish a connection automatically after a disconnect Use friendly robot names Keep the Robot Server alive between applications Working with Variables Reading and Changing Variables Before you can work with a variable, you must get a reference to its FRCVar class object. Examples of getting to a system variable and a KAREL variable are shown below. In these examples, two techniques are shown. The multi-statement technique retains object references to the intermediate FRCVars class objects to get to the ultimate variable. In more complicated applications, saving and reusing the reference to these intermediate objects can simplify the application if the variable structure has several fields. Even in the single statement technique, the Robot Server must create the intermediate objects so there is very little performance difference for these specific examples. Any time an object is created, the Robot Server keeps an internal reference to it. So even if the Visual Basic reference goes out of scope as in the examples below, the next time the variable is accessed more quickly because the Robot Server already has the structure cached in its memory. Every time the Error! Hyperlink reference not valid. property is used, the Robot Server gets or sets the current value on the controller. The exception to this rule is when the FRCVar.NoRefresh or FRCVars.NoRefresh property is set to TRUE. Example - Setting system variable $MCR.$DRY_RUN Private Sub SetDryRun () Dim objSysVars As FRCVars ' Access to system variables Dim objMCR As FRCVars ' Access to $MCR Dim objDryRun as FRCVar ' Access to $MCR.$DRY_RUN ' Multi-statement technique Set objSysVars = gobjRobot.SysVariables Set objMcr = objSysVars.Item("$MCR") Set objDryRun = objMcr.Item("$DRY_RUN") ' Single statement technique Set objDryRun = gobjRobot.SysVariables("$MCR.$DRY_RUN") ' Set the variable objDryRun.Value = TRUE End Sub Example - Reading variable "PartCount" in KAREL program "PROG1" Private Sub CheckCount() Dim objPgmList As FRCPrograms ' Collection of Programs Dim objProg1 As FRCProgram ' Ref to PROG1 Dim objProg1Vars As FRCVars ' Access to program variables Dim objCount As FRCVar ' Access to PartCount Dim intMyCount As Integer ' Variable to receive value ' Multi-statement technique Set objPgmList = gobjRobot.Programs Set objProg1 = objPgmList.Item("PROG1") Set objProg1Vars = objProg1.Variables Set objCount = objProg1Vars.Item("PartCount") ' Single statement technique Set objCount = gobjRobot.Programs.Item("PROG1") _ .Variables.Item("PartCount") intMyCount = objCount.Value End Sub Working with I/O Monitoring I/O Probably the most common use of the Robot Object’s I/O interface is to monitor I/O states and take action when they change. The Robot Server works in cooperation with the controller to make these events possible. The controller maintains a list of I/O signals to monitor in its low priority condition handler. The Robot Server adds/removes I/O signals to/from this list in response to FRCxxxIOSignal.StartMonitor and FRCxxxIOSignal.StopMonitor requests from your PC application. Example – Have Shape color reflect I/O Status ' This program segment paints the "Light" based on DI[1] ' On = Green, Off = Red ' Private WithEvents mobjDIn1 As FRCDigitalIOSignal Private Sub Form_Load() ' Create the object and tell it to start monitoring ' the value every 200 ms. ' Set mobjDIn1 = gobjRobot.IOTypes _ .Item(frDOutType).Signals.Item(1) mobjDIn1.StartMonitor 200 End Sub Private Sub mobjDIn1_Change() ' Update status "light" based on DI[1] ' If mobjDIn1.Value = True Then shpLight.BackColor = vbGreen Else shpLight.BackColor = vbRed End If End Sub Caution: It is important to understand the characteristics of local condition handlers that affect StartMonitor. When StartMonitor is used to watch a variable or I/O point, it is possible that an event will not be raised if the variable or I/O quickly changes back to the original value/state. If, for example, an input is pulsed for a duration less than the StartMonitor Latency parameter, it is likely that the change will be missed often. On a very busy controller, it is even possible to miss changes that are held for multiple scan latency periods. The StartMonitor mechanism is designed for UIF applications and not control. It is convenient for reducing network traffic when keeping a display screen updated with controller status. However, you should use the FRCPacketEvent object features if you want to be selective and respond only to critical events that occur on the controller. Reading and Changing Position Variables Checking Reachability Supplying move information to IsReachable A position that can be reached by a standard Joint move is sometimes not reachable depending on where the move originates and what kind of motion control is used. For example, the configuration of the start and destination positions must match for the robot to move between them with a Linear move. IsReachable provides a way to quickly check this. You can specify where the robot is coming from and what type of motion it is using for a more complete reach check. This check takes on the form: objPosition.IsReachable objFromPos, enuMoType, enuOrientType Where: objFromPos is the position that the robot is coming from. enuMoType is either frJointMotionType or frLinearMotionType enuOrientType is the orientation control. Valid combinations recognized by IsReachable are shown in the table below. EnuMoType EnuOrientType frJointMotionType Not provided (defaults to frRSWorldOrientType) frJointMotionType frMinRotationOrientType frLinearMotionType Not provided (defaults to frRSWorldOrientType) frLinearMotionType frWristJointOrientType frLinearMotionType frWristJointOrientType + frMinRotationOrientType IsReachable uses these parameters plus the system variables $GROUP[].$USE_TURNS, $GROUP[].$USE_CONFIG, and $GROUP[].$USE_WJTURNS to predict if there will be a problem moving position. If any problem is detected, IsReachable will be returned as FALSE. At this point you can try different motion and orientation types to see if one solves the problem. NOTE: Specifying frJointMotionType with frRSWorldOrientType is equivalent to using IsReachable with no parameters. Using Pipes for High Performance Data Acquisition Activating a Pipe Once the pipe is registered the PC application must call the FRCPipe.StartMonitor method to start monitoring it. This does two things; It tells the controller to activate the pipe and to forward data written to the pipe to this Robot Server. Until a pipe is active, the KAREL task has no reason to write to it. Refer to the section entitled Registering a Pipe to understand the context of when the InitMonitoring routine might be called. Example – Activating the pipe Private WithEvents mobjDispMonPipe As FRCPipe Private Sub InitMonitoring(vobjPipe As FRCPipe) ' Copy the object reference into a module level ' object variable so its events can be monitored. Set mobjDispMonPipe = vobjPipe ' Start monitoring for data. ' This will activate the pipe too. mobjDispMonPipe.StartMonitor 500 End Sub A pipe can be activated by the controller, but this does the PC application no good until the it starts monitoring the data. Handling Errors FRCRobotErrorInfo Some of the Robot Object Properties and Methods employ controller services directly which have their own controller side error numbers. Instead of duplicating these numbers with a parallel set of numbers on the PC side, the Robot Server raises these with Err.Number = frRobotError. However, Err.Description is the actual text for the error from the controller. Your application can retrieve the controller error code number if it needs to do some automatic error handling. The Robot Server remembers the last controller error and makes it available to you through the FRCRobot.GetErrorInfo method. You can use the FRCRobotErrorInfo class object to access this information. Example – Getting a controller error code ' This example runs the KAREL program PROG1. ' It displays Robot error codes ' Private Sub RunIt() Dim objProg1Pgm As FRCKARELProgram On Error GoTo Runit_err ' Run the program ' Set objProg1Pgm = gobjRobot.Programs.Item("PROG1") objProg1Pgm.Run Exit Sub Runit_err: If Err.Number = frRobotError Then Dim objControllerCodes As FRCRobotErrorInfo Set objControllerCodes = gobjRobot.GetErrorInfo MsgBox "Controller error " & vbCrLf & _ "Facility: " & objControllerCodes.Facility & vbCrLf & _ "Number: " & objControllerCodes.Number & vbCrLf & _ "Severity: " & objControllerCodes.Severity & vbCrLf & _ Err.Description End If End Sub Robot Neighborhood Overview Working With the Robot Neighborhood Structure Populating the Robot Neighborhood When the Robot Neighborhood is first installed on your PC, it will be empty. The user will be able to populate it manually one at a time using the New selection in the context menu in Windows Explorer. Your application can also do it programmatically using the three methods AddRobots, AddRealRobot and AddVirtualRobot provided by FRCRNRobots. When adding a real robot, you need to supply a name to identify it by and its network host name. If your network does not have a DNS (Domain Name Server) or the robot is not listed in the DNS tables, then you can supply the IP address instead of the host name. When adding a virtual robot, you need to supply a name to identify it by and the file system path to the location of the virtual robot itself. The Robot Neighborhood does not have a tool to create virtual robots. They must exist before they can be added to the neighborhood. Typically, ROBOGUIDE is used to create the virtual robots. By default, ROBOGUIDE places them under \My Workcells\WorkcellName\ where WorkcellName is the same as that used in the ROBOGUIDE GUI. The following routine will create the "Body Shop" structure at the root of the neighborhood. Private Sub PopulateBodyShop() Dim objRN As FRCRobotNeighborhood Dim objBodyShop As FRCRNRobots Dim objLine1 As FRCRNRobots Dim objVLine1 As FRCRNRobots Set objRN = New FRCRobotNeighborhood Set objBodyShop = objRN.Robots.AddRobots("Body Shop") ' Add the group of real robots ‘ The IP address is shown. Using DNS name is better. Set objLine1 = objBodyShop.AddRobots("Line 1") objLine1.AddRealRobot "Robot 1", "192,168.0.1" objLine1.AddRealRobot "Robot 2", "192,168.0.2" ' Add the virtual line Set objVLine1 = objBodyShop.AddRobots("Virtual Line 1") objVLine1.AddVirtualRobot "Robot 1", _ "C:\My Workcells\Line1\Robot_1" objVLine1.AddVirtualRobot "Robot 2", _ "C:\My Workcells\Line1\Robot_2" End Sub See FRCRNRobots.Copy FRCRNRobot.Copy and FRCRNRobots.Paste methods for additional ways to configure the Robot Neighborhood. Robot Object Interface Robot FRCRobot FRCRobot.Object Properties FRCRobot.CurPosition Property Description Returns the current position of the robot arm. Syntax [objCurPosition = ]objRobot.CurPosition Parts objRobot as FRCRobot objCurPosition as FRCCurPosition Remarks Applications can use the object returned by this property to detect movement of the robot, as well as determine characteristics of the controller setup. This object retrieves the current position data for any motion group defined on the controller. See Also FRCRobot Object Overview FRCCurPosition Object Overview Example `Example of getting the current position of the robot Dim objRobot as FRCRobot Dim objCurPosition as FRCCurPosition Set objRobot = New FRCRobot objRobot.Connect "robot1" Set objCurPosition = objRobot.CurPosition FRCRobot.IOTypes Property Description Returns the I/O robot objects. Syntax [objIOTypes = ]objRobot.IOTypes Parts objRobot as FRCRobot objIOTypes as FRCIOTypes Remarks The IOTypes property returns a collection object that contains all I/O types currently available on the robot controller (Digital, Analog, Robot, Etc.). See Also FRCRobot Object Overview FRCIOTypes Object Overview Example `Example of getting the I/O Types for this robot Dim objRobot as FRCRobot Dim objIOTypes as FRCIOTypes Set objRobot = New FRCRobot objRobot.Connect "robot1" Set objIOTypes = objRobot.IOTypes FRCRobot.IsConnected Property Description Returns a boolean flag that can be used to determine if the Robot Object is connected to a robot controller. Syntax [blnIsConnected =] objRobot.IsConnected Parts objRobot as FRCRobot blnIsConnected as Boolean Remarks If the returned value is True, the Robot Object is connected to an RJ-3 controller. Otherwise, the Robot Object is not connected. See Also FRCRobot Object Overview FRCRobot.ConnectEx Method Example ` If the robot server being disconnected is a ` potential cause for a specific error, you can ` check for it as follows ` Private Sub WhatEver() On Error GoTo HandleError ' Main Body of sub WhatEver() Exit Sub ' Error handling code ' HandleError: If Not gobjRobot.IsConnected Then MsgBox "Lost communication to robot" Else ' more error checking End If End Sub FRCRobot.Language Property Description Returns/sets the language of the robot controller. Syntax [strLanguage = ]objRobot.Language Parts objRobot as FRCRobot strLanguage as String Remarks This property can be used to change the currently selected language of the controller. The dictionaries for the new language must be loaded on the controller and the PC before this method can succeed. See Also FRCRobot Object Overview FRELanguageConstants Example `Example of getting the language of the controller Dim objRobot as FRCRobot Dim strLanguage as String Set objRobot = New FRCRobot objRobot.Connect "robot1" strLanguage = objRobot.Language FRCRobot.Programs Property Description Returns the list of programs currently loaded on the controller. Syntax [objProgs = ]objRobot.Programs Parts objRobot as FRCRobot objProgs as FRCPrograms Remarks This collection holds all program types (TP, KAREL and Variable) that exist on the controller. See Also FRCRobot Object Overview FRCPrograms Object Overview Example `Example of getting the collection of programs on the `controller Dim objRobot as FRCRobot Dim objProgs as FRCPrograms Set objRobot = New FRCRobot objRobot.Connect "robot1" Set objProgs = objRobot.Programs FRCRobot.RegNumerics Property Description Returns the robot numeric registers. Syntax [objNumRegs = ]objRobot.RegNumerics Parts objRobot as FRCRobot objNumRegs as FRCVars Remarks This property provides access to the numeric registers of the controller. These registers are typically accessed from TP programs. See Also FRCRobot Object Overview FRCVars Object Overview FRCVar Object Overview FRCRegNumeric Object Overview Example `Example of getting the numeric registers Dim objRobot as FRCRobot Dim objNumRegs as FRCVars Dim objNumReg as FRCVar Dim objRegValue as FRCRegNumeric Dim lngValue as Long Set objRobot = New FRCRobot objRobot.Connect "robot1" Set objNumRegs = objRobot.RegNumerics Set objNumReg = objNumRegs(1) Set objRegValue = objNumReg.Value lngValue = objRegValue.RegLong FRELanguageConstants frFrenchLanguage Description The French language. Remarks The French dictionary file is currently in use on the controller. See Also FRELanguageConstants Overview FRCRobotLanguage Property frGermanLanguage Description The German language. Remarks The German dictionary file is in currently use on the controller. See Also FRELanguageConstants Overview FRCRobotLanguage Property frSpanishLanguage Description The Spanish language. Remarks The Spanish dictionary file is currently in use on the controller. See Also FRELanguageConstants Overview FRCRobotLanguage Property FRERemoteMotionMasterConstants frKCLMaster Description The motion master code used to specify that KCL is in control of motion. Remarks none See Also Error! Hyperlink reference not valid. FRCRobot.RemoteMotionMaster Property frNoMaster Description The motion master code used to specify no device is in control of motion. Remarks Use this to inhibit any remote control of motion. See Also Error! Hyperlink reference not valid. FRCRobot.RemoteMotionMaster Property frUOPMaster Description The motion master code used to specify the User Operating Panel device is in control of motion. Remarks See Also Error! Hyperlink reference not valid. FRCRobot.RemoteMotionMaster Property FRERobotErrors Robot Object Errors frObjectNotValid Description Object is no longer valid. Remarks The object is not valid for use. This error is returned from all properties and methods of an object that has been discarded by the Robot Server. The object might have been discarded for any one of the following reasons: 1. The object might represent a piece of data that has been deleted from the controller. For example, if your program is holding a reference to a program that is deleted from the controller, then calling any properties or methods of that object will raise this error. The best way to avoid this problem is to handle the Delete event of the program object (FRCProgram). 2. The object might represent a piece of data that has been superceded by new data on the controller. For example, if your program is holding a reference to any variable object of a particular program when a new .vr file is loaded for the program, then calling any properties or methods of the variable object will raise this error. The best way to avoid this problem is to handle the RefreshVars event of the program object (FRCProgram). 3. The object has been discarded because of an abnormal termination of the connection to the controller. If the controller power is turned off or if the Ethernet connection is otherwise terminated during a communication session, then calling any properties or methods of any objects of the Robot Server that was connected will raise this error. The best way to avoid this problem is to handle the Disconnect event of the robot object (FRCRobot). See Also FRERobotErrors Overview FRCProgram_Delete Event FRCProgram_RefreshVars Event FRCRobot_Disconnect Event frPCIFNotLoaded Description Connection refused because the PCIF option is not loaded. Remarks Raised when the connection to the controller fails because the controller does not have the PC Interface (PCIF) option loaded. The PCIF option is required on the robot controller to support the FRCRobot object’s properties and methods. See Also FRERobotErrors Overview Generic Collection Errors frObjAlreadyExists Description The object already exists in the collection. Remarks An object can not be added to a collection with a duplicate key value. See Also FRERobotErrors Overview Program Errors frInvalidDateTime Description The date or time is invalid. Remarks See Also FRERobotErrors Overview frProgInvalidParam Description Invalid program object parameter. Remarks An invalid program type was passed to the Add method of the programs collection. See Also FRERobotErrors Overview FRCPrograms.Add method frProgramNotLoaded Description Program is not currently loaded. Remarks This error is raised when an application tries to get a program object from the programs collection that is not in the normal or hidden programs collection but exists on the controller and is not a hidden program. This error can only occur when the Item program of the programs collection is called while a program is in the process of being loaded. If an application is getting this error then it should be using the Create event of the programs collection to know when the new program is completely loaded and ready for use. See Also FRERobotErrors Overview FRCPrograms.Item property FRCPrograms_Create event Variable Errors frInvVarName Description Invalid variable name. Remarks This error is returned by the Item property of a variable collection object (FRCVars). This error is raised when the name specified is not valid because it contains invalid characters or the variable name simply doesn’t exist in the collection. See Also FRERobotErrors Overview FRCVars.Item property frInvVarType Description The variable is of an invalid type. Remarks This error is raised if the robot object property does not apply to the class of variable being accessed by the object. The following cases will generate this error: - Setting FRCVar.Value, where the .Value is an object type - Calling FRCVar.Uninitialize on a Numeric register or position - Calling FRCVars.StartMonitor or FRCVars.StopMonitor - Accessing FRCVar.MaxValue or FRCVar.MinValue where the .Value is an object type - Accessing a FILE type variable See Also FRERobotErrors Overview FRCVar Object Overview Position Errors frAxesRange Description Axes index is out of range. Remarks This error is raised when an axis index is out of range for the joint position. FRCJoint.Item raises this error when the index is not between 1 and the number of axes for the position (as returned by the count property). See Also FRERobotErrors Overview FRCJoint.Item property FRCJoint.Count property frExtAxesNotSupported Description Extended axis index is not supported for this position. Remarks This error is raised from FRCAxesCollection’s Item property when the axis index specified is not supported by the collection. Indexes must be between 1 and the maximum number of extended axes (returned by FRCAxesCollection.Count). See Also FRERobotErrors Overview FRCAxesCollection.Item property FRCAxesCollection.Count property frInvVectIndex Description Invalid vector index value. Must be in the range 1 to 3. Remarks This error is raised by FRCVector.Item property when the specified index is invalid. Vector indexes must be in the range of 1 to 3. See Also FRERobotErrors Overview FRCVector.Item property. I/O Errors frIOSaveBadFileExtension Description File extension for I/O save must be .IO. Remarks The file name you supply to FRCIOTypes.Save must have the extension ".io". If you provide a file name with no extension, .io will be added. If you supply a file name with something other than .io, this error code will be raised. See Also Error! Hyperlink reference not valid. FRERobotErrors Overview Packet Event Errors frPacketEventBodyCorrupt Description The data could not be decoded. The buffer might be corrupted. Remarks This error will be raised if the format of the data in the Body of the Packet happens to partially meet the requirements of the FRCPacket.DecodeBody method. If the format is completely wrong, you will get the frPacketEventNoSuchItem error. See Also FRERobotErrors Overview FRCPacket.DecodeBody method frPacketEventInvSSC Description SubSystem Code must be a number in the range 0 to 255. Remarks This error is raised by FRCRobot.CreatePacketEvent when the sub-system code parameter is invalid. Sub-system codes must be in the range of 0 to 255. See Also FRERobotErrors Overview FRCRobot.CreatePacketEvent method frPacketEventNoSuchItem Description The requested data item does not exist. Remarks This is raised from the FRCPacket.DecodeBody method. Calling FRCPacket.DecodeBody until this error is raised is a useful technique for passing a variable number of values in a packet. See Also FRERobotErrors Overview FRCPacket.DecodeBody method Pipe Errors frPipeCantCreateMonitor Description The Pipe monitor thread can't be created. Remarks The Robot Server uses a separate Windows thread to monitor data coming from controller pipes. This error will be raised if that thread can’t be created. This would be a fundamental Windows resource problem. Try closing other applications or rebooting. See Also FRERobotErrors Overview frPipeInvalidFieldIndex Description Invalid pipe field index. Remarks This error will be raised if a field does not exist at the index supplied to the FRCFields.Item property. See Also FRERobotErrors Overview FRCFields.Item Property frPipeInvalidFieldName Description Invalid pipe field name. Remarks This error will be raised if a field by the name specified to the FRCFields.Item property does not exist. Make sure you are not using the expanded, full field name. See Also FRERobotErrors Overview FRCFields.Item Property FRESaveOptionConstants frStandardSave Description Save the file without automatically overwriting any older version. Remarks When used in a FRCProgram.Save method, this specifies that the data is to be saved to a file, but should not automatically overwrite an old file. If a file of the target name already exists on the storage device, the .Save method will return an error and the data will not be carried saved. See Also FRESaveOptionConstants Overview FRCProgram.Save Method Programs FRCProgram FRCProgram Object Properties FRCProgram.IgnoreAbort Property Description Returns/sets the state of the IgnoreAbort attribute. Syntax [blnIgnoreAbort = ]objProg.IgnoreAbort(lngIgnoreConstant) Parts objProg as FRCProgram blnIgnoreAbort as Boolean lngIgnoreConstant as FRETaskIgnoreConstants Remarks none See Also FRCProgram Object Overview FRCTask.IgnoreAbort Property FRETaskIgnoreConstants Overview Example Dim objProg as FRCProgram ’First get the program object Set objProg = mobjPrograms.Item("MYPROG") ’Set the IgnoreAbort(frIgnoreCommand) Property to True objProg.IgnoreAbort(frIgnoreCommand) = True FRCProgram.IgnorePause Property Description Returns/sets the state of the IgnorePause attribute. Syntax [blnIgnorePause = ]objProg.IgnorePause(lngIgnoreConstant) Parts objProg as FRCProgram blnIgnorePause as Boolean lngIgnoreConstant as FRETaskIgnoreConstants Remarks none See Also FRCProgram Object Overview FRCTask.IgnorePause Property FRETaskIgnoreConstants Overview Example Dim objProg as FRCProgram ’First get the program object Set objProg = mobjPrograms.Item("MYPROG") ’Set the IgnorePause(frIgnoreCommand) Property to True objProg.IgnorePause(frIgnoreCommand) = True FRCProgram.StackSize Property Description Returns/sets the stack size for the program. Syntax [lngStackSize = ]objProg.StackSize Parts objProg as FRCProgram lngStackSize as Long Remarks none See Also FRCProgram Object Overview FRCTask.StackSize Property Example Dim objProg as FRCProgram Dim lngStackSize as Long ’First get the program object Set objProg = mobjPrograms.Item("MYPROG") ’Get the Stack Size lngStackSize = objProg.StackSize FRCProgram.TimeSlice Property Description Returns the required time slice for the program. Syntax [lngSlice = ]objProg.TimeSlice Parts objProg as FRCProgram lngSlice as Long Remarks none See Also FRCProgram Object Overview FRCTask.TimeSlice Property Example Dim objProg as FRCProgram Dim lngTimeSlice as Long ’First get the program object Set objProg = mobjPrograms.Item("MYPROG") ’Get the Time Slice lngTimeSlick = objProg.TimeSlice FRCProgram.Variables Property Description Returns a reference to the top level of the variables defined for the program. Syntax [objVars = ]objProg.Variables Parts objProg as FRCProgram objVars as FRCVars Remarks If the program has no variables, the FRCVars collection will be empty. See Also FRCProgram Object Overview FRCVars Object Overview Example Dim objProg as FRCProgram Dim objProgVars as FRCVars ’First get the program object Set objProg = mobjPrograms.Item("MYPROG") ’Get the Program Variables Collection objProgVars = objProg.Variables FRCProgram Object Events FRCProgram_RefreshVars Event Description Occurs after a program’s variables are reloaded. Syntax Private Sub mobjProgram_RefreshVars() End Sub Parts mobjProgram as FRCProgram Remarks This event is automatically generated whenever a VR, SV, or PC file is loaded and the program already exists. Note that a teach pendant program might also contain variables. All existing variable objects of the program are deleted. If any references to these objects still exist then the objects will not be deleted and further operations on these objects will raise the frObjectNotValid error. System variables, frame positions, and position registers are not deleted. References to these objects are always valid. See Also FRCProgram Object Overview FRCRobot.Load Method Example Private Sub mobjProgram_RefreshVars() ‘Inform user that program’s variables are refreshed MsgBox mobjProgram.Name & "’s variables refreshed", _ vbOkOnly + vbInformation, mobjProgram.Name End Sub FRCPrograms FRCPrograms Object Overview Description Represents the collection of all programs currently loaded on the robot controller (for example, teach pendant, KAREL, and variable programs). Overview Objects in the collection can be retrieved through the Item property or by using a For Each loop. Properties Count as Long (read-only) Item (Name [, NewReference, AccessMode, RejectMode]) Parent as FRCRobot (read-only) Robot as FRCRobot (read-only) Selected as String Methods Remove(Name as String) TryItem (Name [, NewReference, AccessMode, RejectMode], Prog) Events AttrChange (Program, Attr) Create (Program as FRCProgram) Delete (Program as FRCProgram) Refresh (Program as FRCProgram) RefreshVars (Program as FRCProgram) Rename(Program as FRCProgram) Select() SubTypeChange(Program as FRCTPProgram) SubTypeChange2(Program as FRCProgram) See Also FRCProgram Object Overview FRCKARELProgram Object Overview FRCVRProgram Object Overview FRCTPProgram Object Overview FREProgramTypeConstants Overview FREAccessModeConstants Overview FRERejectModeConstants Overview FRCPrograms Object Properties FRCPrograms.Count Property Description Returns the number of programs currently in the collection that are loaded and visible on the controller. Syntax lngNumProgs = objProgs.Count Parts objProgs as FRCPrograms lngNumProgs as Long Remarks Count does not include invisible programs loaded on the controller. See Also FRCPrograms Object Overview Example Dim objRobot as FRCRobot Dim objProgs as FRCPrograms Dim lngNumProgs as Long ’Get a robot object reference, then the Programs Collection Set objRobot = New FRCRobot Set objProgs = objRobot.Programs ’Get the number of programs in the collection lngNumProgs = objProgs.Count FRCPrograms.Item Property Description Returns the specified program from the programs collection. Syntax objProg = objProgs.Item( vntName as Variant [, blnNewReference as Boolean, lngAccessMode as FREAccessModeConstants, lngRejectMode as FRERejectModeConstants]) Parts objProgs as FRCPrograms vntName as Variant blnNewReference as Boolean lngAccessMode as FREAccessModeConstants lngRejectMode as FRERejectModeConstants objProg as {FRCKARELProgram | FRCVRProgram | FRCTPProgram | FRCProgram} Remarks Name can be specified as a string, representing the program name, or as an Integer or Long, representing the index of the program in the collection. Index begins at 0. The arguments NewReference, AccessMode and RejectMode apply only to teach pendant Programs. They allow you to control the access level to the teach pendant program to protect it from being modified while you are using it. If the value of NewReference is False or not specified, then a shared reference to the program is used. This will allow fast access to reading properties of the program. If NewReference = False, then AccessMode and RejectMode cannot be specified. However, a program cannot be modified unless a new reference is created with the appropriate access mode and reject mode. A program that is opened with a new reference (for example, NewReference = TRUE) can still be opened with read-only access and then re-opened using the ReOpen method later to allow writing. When just the shared program object is used the Reopen method will return an error. An invisible program loaded on the controller is not listed in the program collection; however, it can be retrieved using the Item property. See Also FRCPrograms Object Overview FRCProgram Object Overview FRCPrograms.TryItem Method FRCKARELProgram Object Overview FRCVRProgram Object Overview FRCTPProgram Object Overview FREAccessModeConstants Overview FRERejectModeConstants Overview Example Dim objRobot as FRCRobot Dim objProgs as FRCPrograms Dim objProgram as FRCProgram ’Get a robot object reference, then the Programs Collection Set objRobot = New FRCRobot Set objProgs = objRobot.Programs ’Get a program from the collection ’Get Test12 as a new reference with read-write permission ’Prevent others from opening with write-overwrite permission Set objProgram = objProgs.Item("Test12", True, frReadWriteAccess, _ frWriteOverwriteReject) FRCPrograms.Parent Property Description Returns the parent Robot object of the Programs Collection. Syntax objRobot = objProgs.Parent Parts objProgs as FRCPrograms objRobot as FRCRobot Remarks This property is read only. See Also FRCPrograms Object Overview FRCRobot Object Overview Example Dim objRobot as FRCRobot Dim objProgs as FRCPrograms Dim objRobotCheck as FRCRobot ’Get a robot object reference, then the Programs Collection Set objRobot = New FRCRobot Set objProgs = objRobot.Programs ’Get the parent object of the collection Set objRobotCheck = objProgs.Parent FRCPrograms.Selected Property Description Returns/sets the currently selected program. Syntax [strProgName = ]objProgs.Selected Parts objProgs as FRCPrograms strProgName as String Remarks Returns the string name of the currently selected program. The currently selected program is the program currently being edited or debugged in the teach pendant program editor. This name can be used to open the program using the Item method. Setting this property changes the selected program, which only affects which program is being debugged or is started using the CYCLE START button. At the robot level, the current program being edited doesn't change. However, higher-level robot server objects can force the teach pendant program editor to always match this property. Setting this property sets the system variable $TP_DEFPROG. See Also FRCPrograms Object Overview FRCPrograms_Select Event Example Dim objRobot as FRCRobot Dim objProgs as FRCPrograms Dim strSelProg as String ’Get a robot object reference, then the Programs Collection Set objRobot = New FRCRobot Set objProgs = objRobot.Programs ’Get the name of the currently selected program strSelProg = objProgs.Selected FRCPrograms Object Events FRCPrograms_AttrChange Event Description Occurs after an attribute is changed. Syntax Private Sub mobjPrograms_AttrChange(Program as FRCProgram, Attr as FREAttributeConstants) End Sub Parts mobjPrograms as FRCPrograms Program as FRCProgram Attr as FREAttributeConstants Remarks This event is automatically generated whenever a program attribute is changed. The Attr parameter specifies which parameter was changed. Only visible programs will generate this event. See Also FRCPrograms Object Overview FREAttributeConstants Overview Example Private Sub mobjPrograms_AttrChange(ByVal Program as FRCProgram, _ ByVal Attr as FREAttributeConstants) ‘Set a boolean flag when a program attribute changes mblnAttrChange = True End Sub FRCPrograms_RefreshVars Event Description Occurs after a program’s variables are reloaded. Syntax Private Sub mobjPrograms_RefreshVars(Program as FRCProgram) End Sub Parts mobjPrograms as FRCPrograms Program as FRCProgram Remarks This event is automatically generated whenever a VR, SV, or PC file is loaded and the program already exists. Note that a teach pendant program might also contain variables. Only visible programs will generate this event. All existing variable objects of the program are deleted. If you access any of properties and methods of these deleted objects after returning from this event, the frObjectNotValid error will be raised. System variables, frame positions, and position registers are not deleted. References to these objects are always valid. See Also FRCPrograms Object Overview FRCRobot.Load Method Example Private Sub mobjPrograms_RefreshVars(ByVal Program as FRCProgram) MsgBox "Variables for program " & Program.Name & " were refreshed" End Sub FRCPrograms_SubTypeChange Event FRCPrograms_SubTypeChange2 Event Description Occurs after a program’s subtype is changed. Syntax Private Sub mobjPrograms_SubTypeChange(TPProgram As FRCTPProgram) End Sub Private Sub mobjPrograms_SubTypeChange2(Program As FRCProgram) End Sub Parts mobjPrograms as FRCPrograms TPProgram as FRCTPProgram Program as FRCProgram Remarks This event is automatically generated whenever a program’s subtype is changed. Only visible programs will generate this event. The SubTypeChange event is generated only for teach pendant programs. SubTypeChange2 was introduced in V5.22 when the macro sub type was supported on KAREL programs. This event occurs for both KAREL and teach pendant programs. See Also FRCPrograms Object Overview FRCTPProgram.SubType Property FRCKAREL.SubType Property Example Private Sub mobjPrograms_SubTypeChange(TPProgram As FRCTPProgram) MsgBox "Program " & Program.Name & " subtype was changed" End Sub FRCTPProgram FRCTPProgram Object Events FRCTPProgram_SubTypeChange Event Description Occurs after a teach pendant program’s subtype is changed. Syntax Private Sub mobjProgram_SubTypeChange() End Sub Parts mobjProgram as FRCTPProgram Remarks This event is automatically generated whenever a teach pendant program’s subtype is changed. See Also FRCTPProgram Object Overview FRCTPProgram.SubType Property Example Private Sub mobjProgram_SubTypeChange() ‘Post message box saying program subtype has changed MsgBox mobjProgram.Name & " subtype has changed.", _ vbInformation + vbOkOnly, "Program Notification" End Sub FREAttributeConstants frIgnoreAbortAttr Description Identifies the IgnoreAbort program attribute. Remarks none See Also FREAttributeConstants Overview FRCProgram.IgnoreAbort Property frIgnorePauseAttr Description Identifies the IgnorePause program attribute. Remarks none See Also FREAttributeConstants Overview FRCProgram.IgnorePause Property frStackSizeAttr Description Identifies the Stack Size program attribute. Remarks none See Also FREAttributeConstants Overview FRCProgram.StackSize Property frStorageTypeAttr Description Identifies the Storage Type program attribute. Remarks none See Also FREAttributeConstants Overview FRCTPProgram.StorageType Property FREAccessModeConstants FREAccessModeConstants Overview Description An enumeration of constants used when opening and reopening programs from the FRCPrograms collection. Overview These constants are used as arguments within the FRCPrograms.Item Property and FRCProgram.Reopen Method to set the access privileges of the program object you obtain from the FRCPrograms collection. The FRCProgram.Protection property must be set to frReadWriteProtection before opening a program with write or overwrite access. This protection only applies to teach pendant programs. Values frAllAccess frNoAccess frOverwriteAccess frReadAccess Error! Hyperlink reference not valid. frReadWriteAccess frWriteAccess Error! Hyperlink reference not valid. See Also FRCPrograms.Item Property FRCProgram.AccessMode Property FRCProgram.Protection Property FRCProgram.Reopen Method FREProtectionConstants Overview frNoAccess Description Prohibits program access. Remarks This access mode prohibits you from viewing, changing, or adding to the program. See Also FREAccessModeConstants Overview FRCPrograms.Item Property FRCProgram.AccessMode Property FRCProgram.Reopen Method FREProgramTypeConstants FREProgramTypeConstants Overview Description An enumeration of constants used to identify different program types. Overview These constants are returned by the FRCTask.ProgramType Property to identify the program type of the task object. These constants are also used when creating programs on the controller through the FRCPrograms.Add Method. Currently, the only type of program that can be created using the FRCPrograms.Add Method is the FRTPProgramType. Values frKarelProgramType frTPProgramType frVRProgramType See Also FRCTask.ProgramType Property FRCPrograms.Add Method FREProtectionConstants FREProtectionConstants Overview Description An enumeration of constants used to identify and set the program protection. Overview These constants are used to set the FRCProgram.Protection property which determines if the program can be changed. The Protection property must be set to frReadWriteProtection before opening a program with write or overwrite access. Values frReadOnlyProtection Error! Hyperlink reference not valid. See Also FRCPrograms.Item Property FRCProgram.AccessMode Property FRCProgram.Protection Property FRCProgram.Reopen Method FRERejectModeConstants FRERejectModeConstants Overview Description An enumeration of constants used when you open or reopen a teach pendant program from the FRCPrograms collection. Overview These constants are used in the FRCPrograms.Item Property and FRCTPProgram.Reopen Method to determine what kind of access other references or the controller have to the program object. These constants apply to program locking which is only applicable to teach pendant programs. Values frAllReject frNoReject frOverwriteReject Error! Hyperlink reference not valid. frReadReject frReadWriteReject Error! Hyperlink reference not valid. frWriteReject See Also FRCPrograms.Item Property FRCProgram.RejectMode Property FRCProgram.Reopem Method frNoReject Description Allows the controller and other object references to modify the program. Remarks This reject mode allows the controller or other references to the same program to view and make changes to the program. See Also FRERejectModeConstants Overview FRCPrograms.Item Property FRCProgram.RejectMode Property FRCProgram.Reopem Method FRETPSubTypeConstants FRETPSubTypeConstants Overview Description An enumeration of constants used to identify the sub-type of a teach pendant program (FRCTPProgram) object. Overview The subtype of a teach pendant program defines its basic function within the operation of the robot. The various subtypes have certain properties that define how the teach pendant program is used. Starting with R-J3 V5.22, KAREL programs can also be assigned as macro programs. Therefore, the frNoneTPSubType and frMacroTPSubType constants apply to KAREL programs as well. Values frNoneTPSubType frJobTPSubType frProcessTPSubType frMacroTPSubType frConditionTPSubType See Also FRCTPProgram.SubType Property FRCKARELProgram SubType Property FRCPrograms_SubTypeChange Event FRCKARELProgram_SubTypeChange Event FRCTPProgram_SubTypeChange Event frJobTPSubType Description Job program sub type. Remarks This kind of teach pendant program typically calls processes, frProcessTPSubType, and does not usually contain any motion. See Also FRETPSubTypeConstants Overview frProcessTPSubType Tasks FRCTask FRCTask Object Properties FRCTask.CurProgram Property Description Returns the current program that is being executed. Syntax [objProg = ]objTask.CurProgram Parts objTask as FRCTask objProg as {FRCTPProgram | FRCKARELProgram} Remarks This property is different from the top level program started initially since the top level program can call macros of sub-routines that are in other programs. See Also FRCTask Object Overview KAREL Reference Manual Example ’ Display the Current Program, Routine and Line ’ information for the program running under MYTASK. ’ It may be a different one called by the original program ’ started as MYTASK ’ Dim objMyTask as FRCTask Set objMyTask = gobjRobot.Tasks.Item(Name:="MYTASK") txtProgram = objMyTask.CurProgram.Name txtRoutine = objMyTask.CurRoutine txtLine = objMyTask.CurLine FRCTask.CurRoutine Property Description Returns the name of the currently executing KAREL routine. Syntax [strCurRoutine = ]objTask.CurRoutine Parts objTask as FRCTask strCurRoutine as String Remarks If the task is a teach pendant Program or a KAREL program not currently in a routine, the top level program name is returned. See Also FRCTask Object Overview KAREL Reference Manual Example ’ Display the Current Program, Routine and Line number ’ information for the program running under MYTASK. ’ It may be a different one called by the original program ’ started as MYTASK ’ Dim objMyTask as FRCTask Set objMyTask = gobjRobot.Tasks.Item(Name:="MYTASK") txtProgram = objMyTask.CurProgram.Name txtRoutine = objMyTask.CurRoutine txtLine = objMyTask.CurLine FRCTask.HoldCondition Property Description Returns the state of the various hold flags. Syntax [blnReasonHeld =]objTask.HoldCondition(enuHoldCond) Parts objTask as FRCTask blnReasonHeld as Boolean enuHoldCond as FREHoldConditionConstants Remarks Execution can be held for more than one reason. The FREHoldConditionConstants are used to index the hold flags. See Also FRCTask Object Overview FREHoldConditionConstants Overview KAREL Reference Manual Example ’ Check if the task execution is being held. ’ Dim objMyTask as FRCTask Set objMyTask = gobjRobot.Tasks.Item(Name:="MYTASK") If objTask.HoldCondition(frHoldAny) Then MsgBox "Task is held" End If FRCTask.MotionControl Property Description Returns whether the task has motion control of a group. Syntax [blnMotionControl = ] objTask.MotionControl(intGroup) Parts objTask as FRCTask blnMotionControl as Boolean intGroup as Integer Remarks Motion control is checked independently by group number. See Also FRCTask Object Overview KAREL Reference Manual Example ’ Check if MYTASK has control of Group 1 ’ Dim objMyTask as FRCTask Set objMyTask = gobjRobot.Tasks.Item(Name:="MYTASK") If objMyTask.MotionControl(1) Then MsgBox "MYTASK has control of Group 1" End If FRCTask.ProgramType Property Description Returns the type of program the task represents Syntax [lngProgType = ]objTask.ProgramType Parts objTask as FRCTask lngProgType as FREProgramTypeConstants Remarks This property will either be frKarelProgramType or frTPProgramType See Also FRCTask Object Overview KAREL Reference Manual Example ’ Check the program type ’ Dim objMyTask as FRCTask Set objMyTask = gobjRobot.Tasks.Item(Name:="MYTASK") If objMyTask. ProgramType = frKarelProgramType Then MsgBox "Karel Program" Else MsgBox "TP Program" End If FRCTask.StepType Property Description Returns the task statement stepping type. Syntax [lngStepType = ] objTask.StepType Parts objTask as FRCTask lngStepType as FREStepTypeConstants Remarks Step type cannot be controlled from the PC application See Also FRCTask Object Overview KAREL Reference Manual Example ’ Warn the operator if Single step is on ’ Dim objMyTask as FRCTask Set objMyTask = gobjRobot.Tasks.Item(Name:="MYTASK") If Not (objTask.StepType = frStepNone ) Then MsgBox "Program is in single step mode" End If FRCTask.SystemTask Property Description Returns whether the task is a system task. Syntax [blnIsSystem = ] objTask.SystemTask Parts objTask as FRCTask blnIsSystem as Boolean Remarks If both IsInvisible and this property are True, the task is completely invisible to the operator, but not to the PC application. See Also FRCTask Object Overview KAREL Reference Manual Example ’ Don’t show the user this task if its a system task ’ Dim objMyTask as FRCTask Set objMyTask = gobjRobot.Tasks.Item(Name:="MYTASK") If Not objMyTask.SystemTask Then lstTaskList.Add objMyTask.Name End If FRCTask.TimeSlice Property Description Returns the allotted time slice for the task. Syntax [lngSlice = ]objTask.TimeSlice Parts objTask as FRCTask lngSlice as Long Remarks Tasks with same task priority are executed as round robin scheduling. Time slice duration means the maximum duration to execute this task at one time continuously. The units of this property are milliseconds. The default value is 100. If you want to change this attribute for the program every time it is run, change it using the FRCProgram interface. See Also FRCTask Object Overview FRCProgram.TimeSlice Property KAREL Reference Manual Example ’ Read the Time Slice ’ Dim objMyTask as FRCTask Dim lngSlice as Long Set objMyTask = gobjRobot.Tasks.Item(Name:="MYTASK") lngSlice = objMyTask.TimeSlice FRCTask.TopProgram Property Description Returns the top level program object. Syntax [objProg = ]objTask.TopProgram Parts objTask as FRCTask objProg as {FRCTPProgram | FRCKARELProgram} Remarks This is the program that was initially started. This can be different from the current program because of routine or macro call statements. See Also FRCTask Object Overview KAREL Reference Manual FRCTPProgram Object Overview FRCKARELProgram Object Overview Example ’ Find out which program was run to initiate this ’ task ’ Dim objMyTask as FRCTask Dim objTopProg as FRCProgram Set objMyTask = gobjRobot.Tasks.Item(Name:="MYTASK") Set objTopProg = objMyTask.TopProgram MsgBox objTopProg.Name & " initiated this task" FRCTask.TraceEnable Property Description Returns/sets whether the task has tracing enabled. Syntax [blnIsTraceEnable = ] objTask.IsTraceEnable objTask.IsTraceEnable[ = blnIsTraceEnable] Parts objTask as FRCTask blnIsTraceEnable as Boolean Remarks If this is True, the trace function is enabled and tracing information is stored while the task is running. You can view this trace data on the teach pendant. See Also FRCTask Object Overview KAREL Reference Manual Example ’ Make sure tracing is on for MYTASK ’ Dim objMyTask as FRCTask Set objMyTask = gobjRobot.Tasks.Item(Name:="MYTASK") objMyTask.TraceEnable = True FRCTask.TraceLength Property Description Returns/sets the length of the trace buffer for this task. Syntax [lngSize = ]objTask.TraceLength Parts objTask as FRCTask lngSize as Long Remarks The larger the buffer, the more trace history is saved. See Also FRCTask Object Overview KAREL Reference Manual Example ’ Set up the trace history buffer ’ Dim objMyTask as FRCTask Set objMyTask = gobjRobot.Tasks.Item(Name:="MYTASK") objMyTask.TraceLength = 100 FRCTasks FRCTasks Object Properties FRCTasks.Count Property Description Returns the maximum number of tasks available on the controller. Syntax [intNumTasks = ]objTasks.Count Parts objTasks as FRCTasks intNumTasks as Integer Remarks Use this property as the upper bounds in FOR or other looping constructs for the tasks collection. This property will always return the value of $SCR.$MAXNUMTASK + 2. The two additional tasks are created for internal use by the controller. "Empty" task objects that have not been run at least once will have an idle status (frStatusIdle). See Also FRCTasks Object Overview FRCTask Object Overview Example ’Figure out how many tasks are available on the controller Dim objMyTasks as FRCTasks Dim intNumTasks as Integer intNumTasks = objMyTasks.Count FRCTasks.IsMonitoring Property Description Returns True if task monitoring has been enabled via the StartMonitor method, and False if monitoring is not enabled Syntax [blnIsMonitoring = ]objTasks.IsMonitoring Parts objTasks as FRCTasks blnIsMonitoring as Boolean Remarks IsMonitoring will return a value of True if monitoring has been enabled on the tasks collection by any application program. IsMonitoring will only return false when all programs that have called StartMonitor have called StopMonitor or have released their reference to the tasks collection. See Also FRCTasks Object Overview FRCTask Object Overview FRCTasks.StartMonitor Method FRCTasks.StopMonitor Method Example ’See if task monitoring has been enabled Dim objMyTasks as FRCTasks Dim blnIsMonitoring as Boolean blnIsMonitoring = objMyTasks.IsMonitoring If blnIsMonitoring Then msgbox "Task monitoring is enabled" Else msgbox "Task monitoring is NOT enabled" End If FRCTasks Object Methods FRCTasks.StopMonitor Method Description Stops monitoring of all task objects in the collection for changes. Syntax objTasks.StopMonitor Parts objTasks as FRCTasks Remarks Calling this method stops Change events from occurring on the tasks collection. If two or more programs have started monitoring, Change events will not stop until all programs have called this method. Additionally, if all external programs destroy their reference to this object, monitoring is automatically stopped. If no other application programs have active task monitoring, IsMonitoring will return False when monitoring stops. See Also FRCTasks Object Overview FRCTask Object Overview FRCTasks.IsMonitoring Property Example ’Stop monitoring of all tasks on the controller Dim objMyTasks as FRCTasks objMyTasks.StopMonitor FREExecuteConstants frExecuteNormBwd Description Perform normal backward execution. Remarks Running or continuing a task/program with this constant will make the interpreter execute the program lines in a decreasing (backward) manner, for example, from the current line number down to line 1. Backward execution of a task will result in a step run (pausing at each line). There are several restrictions for running a program backwards, please consult the appropriate controller reference manual for more details. See Also FREExecuteConstants Overview FRCTask.Continue Method FRCTPProgram.Run Method FRCKARELProgram.Run Method FREHoldConditionConstants frHoldAMRPkt Description Waiting for an AMR packet. Remarks Indicates that the task is waiting for an Application Manager Record (AMR) to be completed. Generally, this indicates that a teach pendant application instruction is in progress. For a more detailed description of this hold condition, consult the KAREL Reference Manual See Also FREHoldConditionConstants Overview FRCTask.HoldCondition Property frHoldChgExe Description Waiting for a KAREL call to teach pendant program or vice versa to finish processing. Remarks For a more detailed description of this hold condition, consult the KAREL Reference Manual See Also FREHoldConditionConstants Overview FRCTask.HoldCondition Property frHoldFailLk Description Waiting for a failure to lock the default motion group. Remarks For a more detailed description of this hold condition, consult the KAREL Reference Manual See Also FREHoldConditionConstants Overview FRCTask.HoldCondition Property frHoldMoDone Description Waiting for a motion done message. Remarks For a more detailed description of this hold condition, consult the KAREL Reference Manual See Also FREHoldConditionConstants Overview FRCTask.HoldCondition Property frHoldMoStrt Description Waiting for the motion started message. Remarks For a more detailed description of this hold condition, consult the KAREL Reference Manual See Also FREHoldConditionConstants Overview FRCTask.HoldCondition Property frHoldUAMRPkt Description Waiting for a User AMR packet. Remarks For a more detailed description of this hold condition, consult the KAREL Reference Manual See Also FREHoldConditionConstants Overview FRCTask.HoldCondition Property frHoldUnlock Description Waiting for unlock group complete message. Remarks For a more detailed description of this hold condition, consult the KAREL Reference Manual See Also FREHoldConditionConstants Overview FRCTask.HoldCondition Property frHoldUnwait Description Waiting for an UNWAIT action. Remarks For a more detailed description of this hold condition, consult the KAREL Reference Manual See Also FREHoldConditionConstants Overview FRCTask.HoldCondition Property frHoldVBltin Description Waiting for a vision built-in to complete. Remarks For a more detailed description of this hold condition, consult the KAREL Reference Manual See Also FREHoldConditionConstants Overview FRCTask.HoldCondition Property FREStepTypeConstants frStepTPMotion Description Causes the program to pause after the next statement or KAREL motion. Remarks This constant indicates that the program will execute a single statement, then pause as soon as any KAREL commanded motion has completed. See Also FREStepTypeConstants Overview FRCTask.StepType Property FRCTPProgram.Run Method FRCKARELProgram.Run Method FRETaskAttributeConstants frTaskAttrCircMotion Description Task not circular motion attribute Remarks This constant reflects the value of controller constant PG_NOT_CIRC_MOTION_C. For a more detailed description of this hold condition, consult the KAREL Reference Manual. See Also FRCTask Object Overview FRETaskAttributeConstants Overview frTaskAttrERPrgName Description Task error program name attribute Remarks This constant reflects the value of controller constant PG_ERPRG_NAME_C. For a more detailed description of this hold condition, consult the KAREL Reference Manual. See Also FRCTask Object Overview FRETaskAttributeConstants Overview frTaskAttrNumChild Description Task number of child tasks attribute Remarks This constant reflects the value of controller constant PG_NUM_CHILD_C. For a more detailed description of this hold condition, consult the KAREL Reference Manual. See Also FRCTask Object Overview FRETaskAttributeConstants Overview frTaskAttrParenNum Description Task number of parents attribute Remarks This constant reflects the value of controller constant PG_PARENT_NUM_C. For a more detailed description of this hold condition, consult the KAREL Reference Manual. See Also FRCTask Object Overview FRETaskAttributeConstants Overview frTaskAttrPauseOnShift Description Task pause on shift attribute Remarks This constant reflects the value of controller constant PG_PAUSE_ON_SHIFT_C. For a more detailed description of this hold condition, consult the KAREL Reference Manual. See Also FRCTask Object Overview FRETaskAttributeConstants Overview frTaskAttrStkSize Description Task stack size attribute Remarks This constant reflects the value of controller constant PG_STK_SIZE_C. For a more detailed description of this hold condition, consult the KAREL Reference Manual. See Also FRCTask Object Overview FRETaskAttributeConstants Overview frTaskAttrSuperMotion Description Task super motion attribute Remarks This constant reflects the value of controller constant PG_SUPER_MOTION_C. For a more detailed description of this hold condition, consult the KAREL Reference Manual. See Also FRCTask Object Overview FRETaskAttributeConstants Overview frTaskAttrSystemTask Description Task system task attribute Remarks This constant reflects the value of controller constant PG_SYSTEM_TASK_C. For a more detailed description of this hold condition, consult the KAREL Reference Manual. See Also FRCTask Object Overview FRETaskAttributeConstants Overview frTaskAttrTaskPri Description Task priority attribute Remarks This constant reflects the value of controller constant PG_TASK_PRI_C. For a more detailed description of this hold condition, consult the KAREL Reference Manual. See Also FRCTask Object Overview FRETaskAttributeConstants Overview frTaskAttrTaskSt Description Task status attribute Remarks This constant reflects the value of controller constant PG_TASK_ST_C. For a more detailed description of this hold condition, consult the KAREL Reference Manual. See Also FRCTask Object Overview FRETaskAttributeConstants Overview frTaskAttrTCDStatus Description Task TCD status attribute Remarks This constant reflects the value of controller constant PG_TCD_STATUS_C. For a more detailed description of this hold condition, consult the KAREL Reference Manual. See Also FRCTask Object Overview FRETaskAttributeConstants Overview frTaskAttrTPMotion Description Task teach pendnat motion attribute Remarks This constant reflects the value of controller constant PG_TP_MOTION_C. For a more detailed description of this hold condition, consult the KAREL Reference Manual. See Also FRCTask Object Overview FRETaskAttributeConstants Overview frTaskAttrTraceEnb Description Task trace enabled attribute Remarks This constant reflects the value of controller constant PG_TRACE_ENB_C. For a more detailed description of this hold condition, consult the KAREL Reference Manual. See Also FRCTask Object Overview FRETaskAttributeConstants Overview frTaskAttrTraceLength Description Task trace length attribute Remarks This constant reflects the value of controller constant PG_TRACE_LENGTH_C. For a more detailed description of this hold condition, consult the KAREL Reference Manual. See Also FRCTask Object Overview FRETaskAttributeConstants Overview frTaskAttrUserTaskID Description User task ID attribute Remarks This constant reflects the value of controller constant PG_USER_TASK_ID_C. For a more detailed description of this hold condition, consult the KAREL Reference Manual. See Also FRCTask Object Overview FRETaskAttributeConstants Overview Variables FRCCommonAssoc FRCCommonAssoc Object Overview Description This object is used to access standard associated data common for all KAREL path motion groups. Overview This object allows access to standard associated data common for all KAREL path motion groups. These properties are used by the motion environment to permit various motion characteristics to be changed at each segment of a path. Each property of common associated data applies to all groups. These properties are used only during the execution of a path using the MOVE ALONG statement. They are not used when using MOVE TO for individual path nodes. This object is returned from the Value property of the FRCVar object. Properties Error! Hyperlink reference not valid. (read-only) Program As FRCProgram (read-only) Robot As FRCRobot (read-only) Error! Hyperlink reference not valid. Error! Hyperlink reference not valid. SegTermType As FRETermTypeConstants Error! Hyperlink reference not valid. Methods none Events none FRCCommonAssoc Object Properties FRCCommonAssoc.Parent Property Description Returns the owning variable object. Syntax [objVar = ]objCommonAssoc.Parent Parts objCommonAssoc as FRCCommonAssoc objVar as FRCVar Remarks none See Also FRCCommonAssoc Object Overview FRCRegNumeric FRCRegNumeric Object Properties FRCRegNumeric.Parent Property Description Returns the owning variable object. Syntax [objVar = ]objNumReg.Parent Parts objNumReg as FRCRegNumeric objVar as FRCVar Remarks none See Also FRCRegNumeric Object Overview FRCRegNumeric.RegLong Property Description Returns/sets the long value for the numeric register. Syntax [lngRegInt = ] objNumReg.RegLong Parts objNumReg as FRCRegNumeric lngRegInt as Long Remarks This property will raise an error if it is read when the type is not INTEGER (Type property is not frIntegerType). When this property is set the register type is automatically converted to INTEGER (Type property is set to frIntegerType). See Also FRCRegNumeric Object Overview Example ’Example of getting a numeric register’s integer value Dim lngNumRegValue as Long Dim objNumericRegister as FRCRegNumeric ’Get numeric register to be changed: R[ 1 ] Set objNumericRegister = gobjRobot.RegNumerics( 1 ).Value "Get the integer value lngNumRegValue = objNumericRegister.RegLong FRCRegString Object Properties FRCRegString.Comment Property Description Returns/sets the comment associated with the string register. Syntax [strCmnt = ]objStrReg.Comment Parts objStrReg as FRCRegString strCmnt as String Remarks The comment attached to a string register can be up to 16 characters long. It can contain any upper or lower case alpha character valid on a controller and may include spaces. Note: The comment and value of a string register are always read and written together. The following sequence of events must be understood for effective access string registers. If the PC application reads the value of a string register then later writes a new value to it and between these two events someone on the controller has changed the comment, the 'original' comment will be written to the controller along with the new value. See Also FRCRegString Object Overview Example ’Example of setting a string register’s comment Dim strNewComment as String Dim objStringRegister as FRCRegString ’Get string register to be changed: R[ 1 ] Set objStringRegister = gobjRobot.RegStrings( 1 ).Value ’Put new comment in string strNewComment = "I am SR[1]" ’Put comment in register objStringRegister.Comment = strNewComment FRCRegString.Parent Property Description Returns the owning variable object. Syntax [objVar = ]objStrReg.Parent Parts objStrReg as FRCRegString objVar as FRCVar Remarks This FRCVar object can be used to monitor events related to the string register. See Also FRCRegString Object Overview FRCRegString.Value Property Description Returns/sets the long value for the string register. Syntax [strText = ] objNumReg.Value Parts objNumReg as FRCRegString strText as String Remarks The string value is limited to 254 characters. See Also FRCRegString Object Overview Example ’Example of getting a string register’s integer value Dim strText as String Dim objStringRegister as FRCRegString ’Get string register to be changed: SR[ 1 ] Set objStringRegister = gobjRobot.RegStrings( 1 ).Value "Get the integer value strText = objStringRegister.Value FRCVar FRCVar Object Properties FRCVar.AccessCode Property Description Returns the available access to the variable (read-only, read-write, etc.). Syntax [lngAccess = ]objVar.AccessCode Parts objVar as FRCVar lngAccess as FREVarAccessCodeConstants Remarks This property contains the access level which this object has to the variable’s value. This value might be - frVarNoAccess = "no access" - frVarReadAccess = "read-only access", - frarReadWriteAccess = "read-write access" or any of the other access control constants See Also FREVarAccessCodeConstants Overview FRCVar Object Overview Example ‘ Modify the value if read-write access Dim objVariable as FRCVar Set objVariable = gobjRobot.Programs.Item("MYPROG") _ .Variables.Item("MYVAR") If objVariable.AccessCode = frVarReadWriteAccess Then objVariable.Value = 10 End If FRCVar.FieldName Property Description Returns only the name of this particular variable object. Syntax [strName = ]objVar.FieldName Parts objVar as FRCVar strName as String Remarks This is the name of the variable at its simplest type. It can be the variable name, an element number in an array, or a field name within a structure. This does not include the array name, structure name, or any other kind of container. For example, the variable "$SHELL_CFG.$SHELL_NAME" would simply return "$SHELL_NAME". See Also Error! Hyperlink reference not valid. FRCVar.VarName Property Example ‘ Display the field name in a text box Dim objVariable as FRCVar Set objVariable = gobjRobot.Programs.Item("MYPROG") _ .Variables.Item("MYVAR") txtFieldName = objVariable.FieldName FRCVar.GroupNum Property Description Returns the motion group number for this (position-type) variable object. Syntax [intGrpNum = ]objVar.GroupNum Parts objVar as FRCVar intGrpNum as Integer Remarks This property contains the motion group number for this variable, assuming this object refers to a variable which contains positional data. If this variable does not contain positional data, the error frInvVarType will be returned. Positional data types include frXyzWpr, frExtXyzWpr, frTransform, and frJoint. See Also FRCVar Object Overview FRCPosition Object Overview FRCVarPosition Object Overview Example ‘ If you only need to be concerned with Group1 ‘ sometimes, test and exit ‘ Dim objVariable as FRCVar Set objVariable = gobjRobot.Programs.Item("MYPROG") _ .Variables.Item("MYVAR") If Not (objVariable.GroupNum = 1) Then Exit Sub End If FRCVar.IsInitialized Property Description Returns the initialized status for this variable object. Syntax [blnIsInitialized = ]objVar.IsInitialized Parts objVar as FRCVar blnIsInitialized as Boolean Remarks When most variables are first created, they are in a special "Uninitialized" state. It is also possible to force this state through the FRCVar.Uninitialize method. This property allows you to determine if a variable has been "initialized", or set to any valid value. See Also FRCVar Object Overview FRCVar.Uninitialize Method Example ‘ If the variable is not initialized, inform the ‘ user that processing can’t continue ‘ Dim objVariable as FRCVar Set objVariable = gobjRobot.Programs.Item("MYPROG") _ .Variables.Item("MYVAR") If Not objVariable.IsInitialized Then MsgBox "Variable is not initialized" Exit Sub End If FRCVar.IsMonitoring Property Description Returns the status of whether or not the controller is monitoring this variable. Syntax [blnIsMonitoring = ]objVar.IsMonitoring Parts objVar as FRCVar blnIsMonitoring as Boolean Remarks If more StartMonitor methods have been called to monitor the value of this variable than StopMonitor methods have been called to stop monitoring this variable, this property will return TRUE. If this variable is not currently being monitored, this property will return FALSE. See Also FRCVar Object Overview FRCVar.StartMonitor Method FRCVar.StopMonitor Method FRCVar_Change Event Example ‘ If this variable is not currently being monitored ‘ then start monitoring. Note that it doesn’t hurt ‘ to start monitoring several times ‘ Dim objVariable as FRCVar Set objVariable = gobjRobot.Programs.Item("MYPROG") _ .Variables.Item("MYVAR") If Not objVariable.IsMonitored Then objVariable.StartMonitor 500 End If FRCVar.MaxStringLen Property Description Returns the maximum string length for a string variable. Syntax [intMaxLen = ] objVar.MaxStringLen Parts objVar as FRCVar intMaxLen as Integer Remarks This property returns the maximum number of characters which this variable can contain. Only valid for variables of type frStringType. This property will return a "frNotAStringVar" error if this object refers to a non-string type variable. See Also Error! Hyperlink reference not valid. Example ‘ Tell the user to enter a shorter string if the ‘ one supplied is too long ‘ Dim objVariable as FRCVar Dim strVarText As String Set objVariable = gobjRobot.Programs.Item("MYPROG") _ .Variables.Item("MYVAR") If Len(strVarText) > objVariable.MaxStringLen Then strVarText = InputBox("Variable text too long," & _ "enter a shorter one") End If FRCVar.NoUpdate Property Description Returns/sets whether or not the data is immediately sent to the robot when an assignment is made to the Value property. Syntax objObjectVar.NoUpdate[ = blnTorF] Parts objObjectVar as FRCVar blnTorF as Boolean Remarks Setting the NoUpdate property = True on an individual variable can be done. For example, if you set NoUpdate = True on the FRCVar class object for system variable $DEVICE, the robot’s default device will not change no matter what you assign to its Value property until you invoke the Update method (see FRCVar.Update method). This serves an important role in using the FRCScatteredAccess object. The current value for this variable is read from the robot at the time the NoUpdate property is set to True. It might make sense to set NoUpdate = FALSE on a specific field within a structure for which NoUpdate = TRUE. In this case, when you write to that specific field, the Robot Server immediately sends that value to the robot. Setting the NoUpdate property = TRUE automatically implies the variable is in a NoRefresh state, even if the NoRefresh property = FALSE. Your application could read and write the variable all day long without affecting the controller. Since the FRCRegNumeric class does not have a NoUpdate property, its FRCVar parent must be used to control this. See Also FRCVar Object Overview Optimizing Data Access FRCVar.Update Method FRCVar.NoRefresh Property FRCVar.Refresh Method FRCScatteredAccess Object Overview Example The following example might have no practical value except to demonstrate the workings of NoUpdate. ' ' Assume First is called during initialization ' Private Sub First() Dim objDevice As FRCVar Dim strDeviceOld as String Set objDevice = mobjRobot.SysVariables("$DEVICE") ' Flag the var as NoUpdate. The Value ' of $DEVICE is read from the robot at this time. objDevice.NoUpdate = True ' This access is quick because the Robot ' Server gets the value without accessing the robot strDeviceOld = objDevice.Value ' This statement only affects the copy of $DEVICE held ' by the Robot Server in PC memory. objDevice.Value = "MC:" End Sub ' ' This routine is called sometime after First ' Private Sub Second() Dim objDevice As FRCVar Dim strDeviceLocal As String Set objDevice = mobjRobot.SysVariables("$DEVICE") ' Since objDevice is the same object created in when ' First ran, NoUpdate is still True so the Robot Server ' just returns the value it has without re-accessing ' the robot. strDeviceLocal = objDevice.Value ' StrDeviceLocal will = "MC:" This might not be the ' value that is currently on the robot End Sub FRCVar.Program Property Description Returns the owning program object. Syntax [Set objProgram = ]objVar.Program Parts objVar as FRCVar objProgram as {FRCKARELProgram | FRCVRProgram | FRCTPProgram | FRCProgram} Remarks The Program property provides a reference back to the program. Although this property is described here as a member of FRCVar, It applies to the following objects: FRCCommonAssoc FRCJoint FRCPosition FRCRegNumeric FRCSysGroupPosition FRCTPPosition FRCTPPositions FRCTransform FRCVarPosition FRCVars FRCVector FRCXyzWpr See Also Error! Hyperlink reference not valid. FRCKARELProgram Object Overview FRCVRProgram Object Overview FRCTPProgram Object Overview FRCProgram Object Overview Example ‘ Process this variable one way if it came from ‘ ProgA and another if from ProgB. ‘ Dim objVariable as FRCVar ‘ assume passed in Dim objProg as FRCProgram Set objProg = objVaraible.Program If objParent.Name = "ProgA" Then ‘ Process ProgA data Else ‘ Process ProgB data End If FRCVar.StorageClass Property Description Returns the storage class of the variable. Syntax [lngClass = ]objVar.StorageClass Parts objVar as FRCVar lngClass as FREVarStorageClassConstants Remarks The storage class of a variable refers to the physical memory on the controller where the value is stored. This information is useful because it can be used to determine if the variable is battery-backed or is reset when robot controller power is cycled. See Also Error! Hyperlink reference not valid. FREVarStorageClassConstants Overview Example ‘ If this variable is in CMOS it will be retained ‘ even when power is cycled. ‘ Dim objVariable as FRCVar Set objVariable = gobjRobot.Programs.Item("MYPROG") _ .Variables.Item("MYVAR") If Not (objVariable.StorageClass = frVarCMOS) Then MsgBox "Remember to save this variable or it" & _ " will be lost when power is cycled" End If FRCVar.VarName Property Description Returns the full name of the variable object. Syntax [strName = ] objVar.VarName Parts objVar as FRCVar strName as String Remarks The VarName is the full variable name used to get to the variable object from the highest level. For example, the variable "$SHELL_CFG.$SHELL_NAME" would return "$SHELL_CFG.$SHELL_NAME". See Also Error! Hyperlink reference not valid. FRCVar.FieldName Property Example ‘ Display the variable’s name ‘ Dim objVariable as FRCVar ‘ assume passed in txtName = objVariable.Name FRCVar Object Methods FRCVar.StopMonitor Method Description Tells the controller to stop monitoring the variable for value changes. Syntax objVar.StopMonitor Parts objVar as FRCVar Remarks See FRCVar.StartMonitor for information on monitoring. StartMonitors are accumulative. If FRCVar.StartMonitor method is called three times on a variable, StopMonitor must be called three times to completely stop monitoring a variable’s value. This method is also called automatically when all references to this variable are destroyed. See Also Error! Hyperlink reference not valid. FRCVar.IsMonitoring Property FRCVar.StartMonitor Method FRCVar_Change Event Example ‘Stop the monitor on R[1] which was started in the ‘StartMonitor example gobjRobot.RegNumerics.Item(1).StopMonitor FRCVar Object Events FRCVar_Change Event Description Occurs after a variable is changed. Syntax Private Sub mobjVar_Change() Parts mobjVar as FRCVar Remarks The Change event is received when a FRCVar.Value changes. Value changes made outside the Robot Object will not generate this event unless the StartMonitor method has been called on the FRCVar object. See Also Error! Hyperlink reference not valid. FRCRegNumeric Object Overview FRCVars_Change Event FRCVar.IsMonitoring Property FRCVar.Value Property FRCVar.StartMonitor Method FRCVar.StopMonitor Method Example ‘Display message box when R[1] is changed Private WithEvents mobjR1 as FRCVar Set mobjR1 = gobjRobot.RegNumerics(1) ’Set value which will cause event mobjR1.Value.RegLong = 100 mobjR1.Value.RegFloat = 123.45 Private Sub mobjR1_Change() If mobjR1.Value.Type = frIntegerType Then MsgBox "Change Event on R[1]: " & _ mobjR1.Value.RegLong Else MsgBox "Change Event on R[1]: " & _ mobjR1.Value.RegFloat End If End Sub FRCVars FRCVars Object Properties FRCVars.Count Property Description Returns the number of items within this object. Syntax [intNumFields = ]objVars.Count Parts objVars as FRCVars intNumFields as Integer Remarks This property returns a count of all items within this object. Depending on what this object refers to, this could be the number of variables in a program, the number of elements in an array, the number of fields in a structure, or the number of nodes in a path. See Also FRCVars Object Overview Example ' Find out how many top level variables ' this program has. ' Dim objVars As FRCVars Dim intNumTopVars As Integer Set objVars = gobjRobot.Programs.Item("MYPROG").Variables intNumTopVars = objVars.Count FRCVars.IsMonitoring Property Description Returns the status of whether or not the controller is monitoring this variable. Syntax [blnIsMonitoring = ]objVars.IsMonitoring Parts objVars as FRCVars blnIsMonitoring as Boolean Remarks This property will always return a value of FALSE. Currently, only FRCVar objects can be monitored. See Also FRCVars Object Overview FRCVar.IsMonitoring Property FRCVar.StartMonitor Method FRCVar.StopMonitor Method FRCVar_Change Event FRCVars.NoUpdate Property Description Returns/sets whether or not the data is immediately sent to the robot when an assignment is made to the Value property of the FRCVar objects under this FRCVars object. Syntax objObjectVars.NoUpdate[ = blnTorF] Parts objObjectVars as FRCVars blnTorF as Boolean Remarks The real power of NoUpdate comes in play on structured variables and arrays. Setting the NoUpdate property = TRUE on a structure allows you to set the values on all the fields before sending them to the robot. This not only reduces the number of times that the Robot Server accesses the robot, it also provides a mechanism for the changes to be made simultaneously. Setting NoUpdate = TRUE on an FRCVars class object forces a robot access to immediately read the whole structure’s data into memory. Setting FRCVars.NoUpdate also propagates the setting to all its FRCVar children. The NoUpdate status on individual FRCVar children can be subsequently changed and need not match the FRCVars parent. See Also FRCVars Object Overview Optimizing Data Access FRCVars.Update Method FRCVars.NoRefresh Property FRCVars.Refresh Method Example ' ' Using NoUpdate on a structure variable ' Private Sub LocalNoAuto() Dim objErNoAuto As FRCVars Dim intCode As Integer Set objErNoAuto = mobjRobot.SysVariables("$ER_NOAUTO") ' Flag the Structure as NoUpdate. At this time the ' values are read from the robot and stored in PC ' memory. objErNoAuto.NoUpdate = True ' Write $ER_NOAUTO.$NOAUTO_CODE[1]. ' This just sets the local copy in PC memory of ' $ER_NOAUTO.$NOAUTO_CODE[1] = 1000. ' No Robot access is performed at this time. objErNoAuto("$NOAUTO_CODE")("1") = 1000 ' Read $ER_NOAUTO.$NOAUTO_CODE[2]. Since NoUpdate ' implies NoRefresh, the Robot Server does not access ' the robot for the data. It has been initialized by ' the preceding statement $ER_NOAUTO.NoUpdate = True. intCode = objErNoAuto("$NOAUTO_CODE")("2") End Sub FRCVars.Program Property Description Returns the owning program object. Syntax [Set objProgram = ]objVars.Program Parts objVars as FRCVars objProgram as {FRCKARELProgram | FRCVRProgram | FRCTPProgram | FRCProgram} Remarks The Program property provides a reference back to the program. See Also FRCVars Object Overview FRCKARELProgram Object Overview FRCVRProgram Object Overview FRCTPProgram Object Overview FRCProgram Object Overview Example ‘ Process this array one way if it is from the ‘ the Master Program and another if from the Slave. ‘ Dim objArray as FRCVars ‘ assume passed in Dim objProg as FRCProgram Set objProg = objArray.Program If objProg.Name = "Master" Then ‘ Process Master data Else ‘ Process Slave data End If FRCVars.VarName Property Description Returns the full name of the variable object. Syntax [strName = ]objVars.VarName Parts objVars as FRCVars strName as String Remarks The VarName is the full variable name used to get to the FRCVars object from the highest level. For example, the variable "$SCR_GRP[1]" would return "$SCR_GRP[1]". See Also FRCVars Object Overview FRCVars.FieldName Property Example ’ Display the name of this structure in the text box ’ Dim objStruct as FRCVars ‘ Assume passed in txtStructName = objStruct.VarName FRCVars Object Methods FRCVars.StopMonitor Method Description Tells the controller to stop monitoring the variable for value changes. Syntax objVars.StopMonitor Parts objVars as FRCVars Remarks Currently, monitoring is only allowed on the FRCVar object. This method will raise the error frInvVarType. See Also FRCVars Object Overview FRCVar.IsMonitoring Property FRCVar.StartMonitor Method FRCVar.StopMonitor Method FRCVar_Change Event FRCVars.Update Method Description Sends the local copy of the values for this whole structure to the robot. Syntax objObjectVars.Update Parts objObjectVars as FRCVars Remarks Invoking Update on structures and arrays causes all the data to be sent to the robot in one network access. An exception to this applies to FRCVars class objects that refer to Paths and Top-level Vars. For these, more than one network access might be required. Issuing an Update on an FRCVars class object with NoUpdate = FALSE causes the Robot Server to search the substructures and fields within the scope of the FRCVars object and updates any with NoUpdate = TRUE. The case of a field being set NoUpdate = FALSE within a structure where NoUpdate = TRUE should be understood. Invoking the Update method on the structure causes the field to be updated also. See Also FRCVars Object Overview Optimizing Data Access FRCVars.NoUpdate Property Example ' ' See the example LocalNoAuto() in FRCVars.NoUpdate for a ' context for this example ' Private Sub UpdateNoAuto() Dim objErNoAuto As FRCVars Set objErNoAuto = mobjRobot.SysVariables("$ER_NOAUTO") ' Update only the $NOAUTO_CODE array ' The fields $NOAUTO_ENB, $NOAUTO_NUM and $PS_NOAUTO_C ' do not get written to the robot at this time. objErNoAuto("$NOAUTO_CODE").Update ' Update everything under $ER_NOAUTO objErNoAuto.Update End Sub FRCVars Object Events FRCVars_Change Event Description Occurs after a variable is changed. Syntax Private Sub mobjVars_Change(Var as Object) Parts mobjVars as FRCVars Var as FRCVar Remarks The Change event is received when a FRCVar.Value changes. The changed variable’s FRCVar object will be passed into the event handler. Value changes made outside the Robot Object will not generate this event unless the StartMonitor method has been called on the FRCVar object. This event only occurs on the top most FRCVars object. See Also FRCVars Object Overview FRCRegNumeric Object Overview FRCVar.IsMonitoring Property FRCVar.Value Property FRCVar.StartMonitor Method FRCVar.StopMonitor Method FRCVar_Change Event Example ‘Display message box when Robot Object makes a change ’to "MYPROG" KAREL variables, numeric registers, or ’system variables Private WithEvents mobjVars as FRCVars Private WithEvents mobjRegNumerics as FRCVars Private WithEvents mobjSysVariables as FRCVars Set mobjVars = gobjRobot.Programs("MYPROG").Variables Set mobjRegNumerics = gobjRobot.RegNumerics Set mobjSysVariables = gobjRobot.SysVariables ’Set variables which will cause events mobjVars("INT").Value = 1 mobjRegNumerics.Item(1).Value.RegLong = 1 mobjSysVariables("$RMT_MASTER").Value = 3 Private Sub mobjVars_Change(Var As Object) MsgBox "Change Event on Var: " & Var.VarNameEnd Sub Private Sub mobjRegNumerics_Change(Var As Object) MsgBox "Change Event on Reg: " & Var.VarNameEnd Sub Private Sub mobjSysVariables_Change(Var As Object) MsgBox "Change Event on SysVar: " & Var.VarNameEnd Sub FRCVars_Rename Event Description Occurs after a variable is renamed. Syntax Private Sub mobjVars_Rename(Var as Object) Parts mobjVars as FRCVars Var as {FRCVars | FRCVar | Nothing} Remarks This event is automatically generated after a variable is renamed on the controller. First the variable object is renamed and reordered in the collection. Next the variable object is notified. If the variable object is an FRCVars object, then this event will occur and the event handler’s parameter is Nothing. If the variable object is an FRCVar object, then the FRCVar_Rename event occurs. Lastly this event occurs on the top most FRCVars object. In this case the event handler’s parameter is the FRCVar (or FRCVars) object which was renamed. See Also FRCVars Object Overview FRCVar Object Overview FRCVar_Rename Event Example ' Update the listbox whenever a new variable has been ' Renamed in the variables collection ' Private Sub mobjVars_Rename(Var As Object) Dim objVar As FRCVar lstListBox.Clear For Each objVar In mobjVars lstListBox.AddItem (objVar.VarName) Next End Sub FRESaveClassConstants FRESaveClassConstants Overview Description Enumeration of class constants used when you save information to a file. Overview System variable data within the robot controller consists of many classes. This allows system variable data which is clearly separable from the normal system variables to be saved to a discrete .SV file instead of being added to the massive SYSVARS.SV file. These constants are used to specify which class of system variables is to be saved in the FRCProgram.Save method. Values frAllSaveClass frFTPAccessSaveClass frHostSaveClass frMacroSaveClass frMajoritySaveClass frMasterSaveClass frNoSaveClass frPasswordSaveClass frPMCSaveClass Error! Hyperlink reference not valid. frProfibusSaveClass frServroSaveClass frSpotSaveClass See Also Error! Hyperlink reference not valid. frMajoritySaveClass Description Save majority of system variables Remarks Use this constant to indicate that you want all system variables that are not part of another save class to be saved in the file name specified (normally SYSVARS.SV). See Also FRESaveClassConstants Overview FRCProgram.Save Method frPasswordSaveClass Description Save password system variables Remarks Use this constant to indicate that you want the system variables specific to the password system to be saved in the file name specified (normally SYSPASS.SV). See Also FRESaveClassConstants Overview FRCProgram.Save Method FRETypeCodeConstants FRETypeCodeConstants Overview Description An enumeration of constants used to identify the variable type. Overview These constants represent the variable types that can be returned from the FRCVar.TypeCode property. For a more detailed description of the controller data types, consult KAREL Reference Manual. Values frArrayType frStringType frStructureType frIntegerType frRealType frBooleanType frShortType frByteType frRegNumericType frRegPositionType frRegStringType frJoint frTransform frExtTransform frXyz456 frXyzWpr frExtXyz456 frExtXyzWpr frXyzAes frExtXyzAes frConfigType frVectorType frPathType frCommonAssocType frGroupAssocType frFileType frByteType Description Indicates a BYTE variable. Remarks This type is a 1 byte integer. A BYTE can assume whole number values in the range 0 through 255. No uninitialized checking is done on bytes. Use the Visual Basic Byte variable type to work with controller BYTE variables. The TypeName string associated with this is "BYTE" See Also FRETypeCodeConstants Overview FRCVar.TypeCode Property frExtTransform Description Indicates a Cartesian position represented as a transformation matrix with extended axes. Remarks This is a variable of type POSITION on a robot with extended axes. This variable contains a position in transformation matrix format with data on extended axes positioning. The TypeName string associated with this is "POSITION" See Also FRETypeCodeConstants Overview FRCVarPosition Overview FRCVar.TypeCode Property frGroupAssocType Description Indicates a GROUP_ASSOC data variable. Remarks This variable contains the standard associated data for a motion group, normally defined in a PATH node. This variable contains information concerning relative speed, motion type, break in circular blending, and orientation control mode for this node. The TypeName string associated with this is "GROUP_ASSOC" See Also FRETypeCodeConstants Overview FRCVar.TypeCode Property Positions FRCAxesCollection FRCAxesCollection Object Properties FRCAxesCollection.Count Property Description Returns the number of extended axes in the position. Syntax intNumAxes = objAxes.Count Parts objAxes as FRCAxesCollection intNumAxes as Integer Remarks The number of extended axes is limited to the number of axes defined for the motion group on the controller. If the position was taught using more axes, they will be ignored. If the position was taught using less axes, then the lesser count is used. See Also FRCAxesCollection Object Overview FRCTransform Object Overview FRCXyzWpr Object Overview Example ‘ Get number extended axes for position Dim objExtAxes as FRCAxesCollection Dim intNumAxes as Integer IntNumAxes = ObjExtAxes.Count FRCAxesCollection.Item Property Description Returns/sets the values for each extended axis in the position. Syntax dblAxisVal = objAxes.Item(intAxisNum) OR objAxes.Item(intAxisNum) = dblAxisVal Parts objAxes as FRCAxesCollection intAxisNum as Integer dblAxisVal as Double Remarks intAxisNum begins at 1. Axis values are set and returned in radians or degrees depending on the extended axes setup. See Also FRCAxesCollection Object Overview FRCTransform Object Overview FRCXyxWpr Object Overview Example ‘ Get and set an extended axes value Dim objAxes as FRCAxesCollection Dim dblAxisVal as Double ‘ Get extended axis number 1’s value dblAxisVal = objAxes.Item(1) ‘ Set extended axis number 2’s value to equal number 1 objAxes.Item(2) = dblAxisVal FRCConfig FRCConfig Object Properties FRCConfig.Front Property Description Returns/sets the Front property for the configuration. Syntax blnFront = objConfig.Front OR objConfig.Front = blnFront Parts objConfig as FRCConfig blnFront as Boolean Remarks Allows you to get or set the Front flag as a discrete entity. The exact function of this flag in the robot’s motion system is dependent on the physical characteristics of the robot model. See Also FRCConfig Object Overview FRCTransform Object Overview FRCVar Object Overview FRCXyzWpr Object Overview Example ‘ Get and set a position’s front configuration flag Dim objConfig as FRCConfig Dim blnFront as Boolean ‘ Get the front flag blnFront = objConfig.Front ‘ Set the front flag to False objConfig.Front = False FRCConfig.Left Property Description Returns/sets the Left property for the configuration. Syntax blnLeft = objConfig.Left objConfig.Left = blnLeft Parts objConfig as FRCConfig blnLeft as Boolean Remarks Allows you to get or set the Left flag as a discrete entity. The exact function of this flag in the robot’s motion system is dependent on the physical characteristics of the robot model. See Also FRCConfig Object Overview FRCTransform Object Overview FRCVar Object Overview FRCXyzWpr Object Overview Example ‘ Get and set a position’s left configuration flag Dim objConfig as FRCConfig Dim blnLeft as Boolean ‘ Get the left flag blnLeft = objConfig.Left ‘ Set the left flag to False objConfig.Left = False FRCCurGroupPosition FRCCurGroupPosition Object Overview Description Provides access to the current position of the robot for a specific motion group. Overview The current group position object is an aggregate of the various position formats (XyzWpr, Transform, Joint). The current group position object contains a minimal number of properties that identify the particular position. The remainder of the data must be retrieved from the proper object format. Properties Formats(Type as FRETypeCodeConstants) as {FRCXyzWpr | FRCTransform | FRCJoint} (read-only) GroupNum as Integer (read-only) Id as Long (read-only) Error! Hyperlink reference not valid. (read-only) IsInitialized as Boolean (read-only) IsMonitoring as Boolean (read-only) Parent as FRCCurPosition (read-only) Program as FRCProgram (read-only) Robot as FRCRobot (read-only) Type as FRETypeCodeConstants UserFrame as Long UserTool as Long Methods MatInv(InputPos as Object) MatMul(LeftPos as Object, RightPos as Object) Moveto() Record() Refresh() StartMonitor(Latency as Long) StopMonitor() Uninitialize() Update() Events Change See Also FRCCurPosition Object Overview FRCJoint Object Overview FRCPosition Object Overview FRCProgram Object Overview FRCRobot Object Overview FRCTransform Object Overview FRCXyzWpr Object Overview FRETypeCodeConstants Object Overview FRCCurGroupPosition Properties FRCCurGroupPosition.Parent Property Description Returns the parent object. Syntax objCurPos = objCurGrpPos.Parent Parts objCurGrpPos as FRCCurGroupPosition objCurPos as FRCCurPosition Remarks The parent is always of type FRCCurPosition. See Also FRCCurPosition Object Overview Example ‘ Get parent current position Dim objCurPos as FRCCurPosition Dim objCurGrpPos as FRCCurGroupPosition Set objCurPos = objCurGrpPos.Parent FRCCurPosition FRCCurPosition Properties FRCCurPosition.Group Property Description Returns the FRCCurGroupPosition object representing the current position of the robot for the specified group and display type. Syntax objCurGrpPos = objCurPos.Group(intGroupNum, lngDisplayType) Parts objCurPos as FRCCurPosition intGroupNum as Integer lngDisplayType as FRECurPositionConstants objCurGrpPos as FRCCurGroupPosition Remarks Regardless of the specified display type, the position can be retrieved in any format (XyzWpr, Joint, or Transform). If you want to retrieve joint angles, then it is more efficient to use frJointDisplayType. If you want to retrieve Cartesian coordinates, then it is more efficient to use frUserDisplayType or frWorldDisplayType. If the current position is being monitored, then objCurGrpPos will always contain fresh data. This monitoring prevents a "snapshot" of the current position. If the current position is constantly changing then reading the positional values may cause unexpected values to be read. For example: ’ Setup to monitor robot movement every half second Private WithEvents mobjCurPos as FRCCurPosition mobjCurPos.StartMonitor 500 Dim objXyzWpr As FRCXyzWpr Set objXyzWpr = mobjCurPos.Group(1, frWorldDisplayType).Formats(frXyzWpr) Debug.Print objXyzWpr.X Debug.Print objXyzWpr.Y ‘ Y may be changed since X was read Debug.Print objXyzWpr.Z ‘ Z may be changed since X and Y were read If the current position is not being monitored, then objCurGrpPos will contain a snapshot of the current position. If the objCurGrpPos was used previously, it may have old data in it. The Group property will cause the snapshot to be updated. The objCurGrpPos.Refresh method can also be used to update the snapshot. For example: ’ Valid use of snapshot Dim objXyzWpr As FRCXyzWpr Set objXyzWpr = mobjCurPos.Group(1, frWorldDisplayType).Formats(frXyzWpr) Debug.Print objXyzWpr.X Debug.Print objXyzWpr.Y Debug.Print objXyzWpr.Z ’ Invalid use of snapshot ’ Each time the Group property is called, the position is updated Debug.Print mobjCurPosition.Group(1,frWorldDisplayType).Formats(frXyzWpr).X Debug.Print mobjCurPosition.Group(1,frWorldDisplayType).Formats(frXyzWpr).Y Debug.Print mobjCurPosition.Group(1,frWorldDisplayType).Formats(frXyzWpr).Z See Also Error! Hyperlink reference not valid. FRCCurPosition Object Overview FRECurPositionConstants Overview Example ‘ Get current robot position for group 1 in world coordinates Dim objCurGrpPos as FRCCurGroupPosition Dim objCurPos as FRCCurPosition Set objCurGrpPos = objCurPos.Group(1, frWorldDisplayType) FRCCurPosition Methods FRCCurPosition.StopMonitor Method Description Starts the controller monitoring the current position for changes. Syntax objCurPos.StopMonitor Parts objCurPos as FRCCurPosition Remarks For more than one call of the StartMonitor method, Change events will still occur until all calls are reversed with this method. This method is also called automatically when all references to this position are destroyed. See Also FRCCurPosition_Change Event FRCCurPosition.StartMonitor Method FRCCurPosition Object Overview Example ‘ Stop monitoring robot movement Dim mobjCurPos as FRCCurPosition mobjCurPos.StopMonitor FRCGroupPosition FRCGroupPosition Object Overview Description Provides access to the positional data of a teach pendant position for a specific motion group. Overview The group position object is an aggregate of the various position formats (XyzWpr, Transform, Joint). The group position object contains a minimal number of properties that identify the particular group and position object that it is derived from. The remainder of the data must be retrieved from the proper object format. Properties Formats (Type as FRETypeCodeConstants) as {FRCXyzWpr | FRCTransform | FRCJoint} (read-only) GroupNum as Integer (read-only) Id as Long (read-only) Error! Hyperlink reference not valid. as Boolean (read-only) IsEqualTo(Target as FRCPosition) (read-only) IsInitialized as Boolean (read-only) IsMonitoring as Boolean (read-only) IsReachable( [From as Object [, Motype as FREMotionTypeConstants [, OrientType as FREOrientTypeConstants [, Dest as Object [, MoErrInfo as FRCMotionErrorInfo ]]]]] )as Boolean (read-only) Parent as FRCTPPosition (read-only) Program as FRCProgram (read-only) Robot as FRCRobot (read-only) Type as FRETypeCodeConstants UserFrame as Long UserTool as Long Methods CheckReach( [From as Object [, Motype as FREMotionTypeConstants [, OrientType as FREOrientTypeConstants [, Dest as Object [, MoErrInfo as FRCMotionErrorInfo ]]]]] ) as Boolean Copy Source as Object MatInv (InputPos as Object) MatMul (LeftPos as Object, RightPos as Object) Moveto() Record() Refresh() StartMonitor (Latency as Long) StopMonitor() Uninitialize() Update() Events Change See Also FRCTPPosition Object Overview FRCJoint Object Overview FRCPosition Object Overview FRCProgram Object Overview FRCRobot Object Overview FRCTransform Object Overview FRCXyzWpr Object Overview FRETypeCodeConstants Object Overview FRCGroupPosition Properties FRCGroupPosition.Parent Property Description Returns the parent object. Syntax objTPPos = objGrpPos.Parent Parts objGrpPos as FRCGroupPosition objTPPos as FRCTPPosition Remarks Parent is always of type FRCTPPosition. See Also FRCGroupPosition Object Overview FRCTPPosition Object Overview Example ‘ Get parent TP Position Dim objTPPos as FRCTPPosition Dim objGrpPos as FRCGroupPosition Set objTPPos = objGrpPos.Parent FRCIndGroupPosition FRCIndGroupPosition Object Overview Description Provides access to the positional data of an independent position for a specific motion group. Overview The FRCIndGroupPositon object is an aggregate of the various position formats (XyzWpr, Transform, Joint). It provides properties that identify the status of the position, the particular group it represents and the position object that it is derived from. The remainder of the data must be retrieved from the proper object format. You can use the FRCPosition class interface to generically access an FRCIndGroupPosition object so all of its properties, methods and events are exposed. Properties Formats (Type as FRETypeCodeConstants) as {FRCXyzWrp | FRCTransform | FRCJoint} (read only) GroupNum as Integer (read-only) Id as Long(read-only) IsAtCurPosition as Boolean(read-only) IsEqualTo(Target as FRCPosition) (read-only) IsInitialized as Boolean (read-only) IsMonitoring as Boolean (read-only) IsReachable( [From as Object [, Motype as FREMotionTypeConstants [, OrientType as FREOrientTypeConstants [, Dest as Object [, MoErrInfo as FRCMotionErrorInfo ]]]]] ) as Boolean (read-only) Parent as FRCIndPosition (read-only) Program as FRCProgram (read-only) Robot as FRCRobot (read-only) Type as FRETypeCodeConstants UserFrame as Long UserTool as Long Methods CheckReach( [From as Object [, Motype as FREMotionTypeConstants [, OrientType as FREOrientTypeConstants [, Dest as Object [, MoErrInfo as FRCMotionErrorInfo ]]]]] ) as Boolean Copy Source as Object MatInv InputPos as Object MatMul LeftPos as Object, RightPos as Object Moveto Record Refresh StartMonitor Latency as Long StopMonitor Uninitialize Update Events Change() See Also FRCPosition Object Overview FRCIndPosition Object Overview FRCIndGroupPosition Properties FRCIndGroupPosition.Parent Property Description Returns the parent object. Syntax objIPos = objIGrpPos.Parent Parts objIGrpPos as FRCIndGroupPosition objIPos as FRCIndPosition Remarks Parent is always of type FRCIndPosition. See Also FRCIndGroupPosition Object Overview FRCIndPosition Object Overview Example ‘ Get parent independent position Dim objIPos as FRCIndPosition Dim objIGrpPos as FRCIndGroupPosition Set objIPos = objIGrpPos.Parent FRCIndPosition FRCIndPosition Methods FRCIndPosition.Uninitialize Method Description Uninitializes the position for all groups defined for the independent position. Syntax objIndPos.Uninitialize Parts objIndPos as FRCIndPosition Remarks All currently stored positional data will be lost. After this method, the IsInitialized property will return false. See Also FRCIndPosition.IsInitialized Property FRCIndPosition Object Overview Example ‘ Uninitialize a position Dim obIndPos as FRCIndPosition objIndPos.Uninitialize FRCJoint FRCJoint Object Properties FRCJoint.Count Property Description Returns the number of axes in the position. Syntax [intNumAxes = ]objJoint.Count Parts objJoint as FRCJoint intNumAxes as Integer Remarks The number of axes will equal the number of axes defined for the motion group on the controller. If the position was taught using more axes, they will be ignored. If the position was taught using less axes, then the remaining will be initialized to 0. See Also FRCJoint Object Overview Example ‘ Get the number of Joint axes Dim objJoint as FRCJoint Dim intNumJnts as Integer IntNumJnts = objJoint.Count FRCJoint.Item Property Description Returns/sets the value for each axis in the position. Syntax dblJntVal = objJoint.Item(intJointNum) OR objJoint.Item(intJointNum) = dblJntVal Parts objJoint as FRCJoint intJointNum as Integer dblJntVal as Double Remarks intJointNum begins at 1. Joint values are set and returned in radians or degrees depending on the motion group setup. Positions act like variables with the NoRefresh and NoUpdate properties set to True. Changes to the joint values are not sent to the robot until the Update method is called on the FRCPosition object or one of its parents. Likewise, new position data is read only when the position is first accessed or the Refresh property is called. See Also FRCJoint Object Overview Example ‘ Get first joint axes value and copy ‘ to the second joint Dim objJoint as FRCJoint Dim dblJntVal as Double ‘ Get joint 1’s value dblJntVal = objJoint.Item(1) ‘ Store to joint 2 objJoint.Item(2) = dblJntVal FRCMotionErrorInfo FRCMotionErrorInfo Object Overview Description Provides access to the status of a motion operation. Overview Some operations like checking IsReachable on a position result in a single status but may be caused by a variety of reasons. The FRCMotionErrorInfo object is returned on those operations for which you might need to investigate the reasons. Properties GroupNum as Integer (read-only) JointBitMask as FREJointBitMaskConstants (read-only) Robot as FRCRobot (read-only) RobotErrorInfo as FRCRobotErrorInfo (read-only) UpperLimMask as FREJointBitMaskConstants (read-only) Methods none Events none See Also FRCPosition.IsReachable Property FRCPosition.CheckReach Method FRCRobotErrorInfo Object Overview FRCMotionErrorInfo Properties FRCMotionErrorInfo.GroupNum Property Description Returns the group number for which the error applies. Syntax [intGrpNum = ]objMoErr.GroupNum Parts objPos as FRCMotionErrorInfo intGrpNum as Integer Remarks This property is useful for determining which group failed when you perform an operation on a multi-group position. See Also FRCMotionErrorInfo Object Overview FRCMotionErrorInfo.JointBitMask Property Description Returns a bit mask from which you can determine which joint(s) caused the error. Syntax enuJoints = objMoErr.JointBitMask Parts objMoErr as FRCMotionErrorInfo enuJoints as FREJointBitMaskConstants Remarks Test for joints using the predefined constants defined in the FREJointBitMaskConstants class. See Also FRCMotionErrorInfo Object Overview Example Private Sub AxisCheck(objMoErrInfo As FRCMotionErrorInfo) ' Test if Joint 1 had a limit error If ((objMoErrInfo.JointBitMask And frJoint1BitMask) <> 0) Then MessageBox "Joint 1 limit is exceeded" End If ' General way to detect which joints are out of limit Dim lngJoint As Long Dim intIndex As Integer lngJoint = 1 For intIndex = 1 To 6 If ((objMoErrInfo.JointBitMask And lngJoint) <> 0) Then MessageBox "Joint " + CStr(intIndex) + " limit is exceeded" End If lngJoint = lngJoint * 2 Next intIndex End Sub FRCPosition FRCPosition Properties FRCPosition.IsMonitoring Property Description Returns information about whether the position is currently being monitored for changes. Syntax [blnIsMonitoring = ]objPos.IsMonitoring Parts objPos as FRCPosition blnIsMonitoring as Boolean Remarks Returns a value of TRUE if the StartMonitor method was called on the object, without the StopMonitor method to negate the call. Returns a value of FALSE if the StartMonitor method has not been called on the object, or if the monitoring has been stopped with the StopMonitor method. This property is always TRUE for FRCGroupPosition objects, regardless of the usage of the StartMonitor and StopMonitor methods. See Also FRCPosition.StartMonitor Method FRCPosition.StopMonitor Method FRCPosition Object Overview Example ‘ Check if position is being monitored Dim objPos as FRCPosition If objPos.IsMonitoring then MsgBox "Position is being monitored" Else MsgBox "Position is not being monitored" End IF FRCPosition.IsReachable Property Description Returns a Boolean indicating if the robot can reach the position or not. Syntax [blnTest = ]objPos.IsReachable( [objFromPos [, enuMotype [, enuOrientType [, objDestPos [, objMoErrInfo ]]]]] ) Parts blnTest as Boolean objPos as { FRCPosition | FRCGroupPosition | FRCIndGroupPosition | FRCSysGroupPosition | FRCVarPosition } objFromPos as { FRCGroupPosition | FRCIndGroupPosition | FRCIndPosition | FRCPosition | FRCSysPosition | FRCSysGroupPosition | FRCTPPosition | FRCVarPosition } enuMotype as FREMotionTypeConstants enuOrientType as FREOrientTypeConstants objDestPos as { FRCGroupPosition | FRCIndGroupPosition | FRCIndPosition | FRCPosition | FRCSysPosition | FRCSysGroupPosition | FRCTPPosition | FRCVarPosition } objMoErrInfo as FRCMotionErrorInfo Remarks The arguments are provided to give IsReachable information on how the robot will be moving to the point. Where it comes from and how it gets there sometimes has an impact on whether the point will be reachable or not. NOTE: There is a known issue with VB .NET which always returns objMoErrInfo as Nothing when the IsReachable property is used. Please use the CheckReach method to overcome this limitation. NOTE: These arguments are only supported when you are connected to a V5.30-3 or V6.20-1 or later robot. IsReachable uses a degraded version of reach checking with earlier robots which does not account for where the robot is coming from. With earlier robots it only checks maximum joint limits and does not account for the joint 2-3 interaction that affects joint limits on some robots. If objFromPos is not provided, only joint angle limit checking will be performed. The scope of objFromPos must be the same or broader than objPos. That is, a multi-group objFromPos will work with the single group objPos as long as that group is enabled in objFromPos. enuMoType is optional and defaults to frJointMotionType. It has no meaning if objFromPos is not provided. Only frJointMotionType and frLinearMotionType are supported. enuOrientType is optional and only used if objFromPos is provided. The only orientation types that have an effect on reachability are frWristJointOrientType and frMinRotationType. These types, in combination with the enuMoType argument determine the arm configuration after the robot moves from objFromPos to the position being checked. ObjDestPos is the position that the robot ends up if it moved from objFromPos to objPos. This may be different in turn numbers or configuration depending on the type of move being made. If you are checking reachability of a sequence of points you should supply this parameter and use it as the objFromPos parameter in the IsReachable check for the subsequent point. objMotionErrorInfo, if provided, enables access to additional information that might be helpful in understanding why the position was declared unreachable. See Also Checking if a point can be reached FRCPosition Object Overview FRCPosition.CheckReach Method FREMotionTypeConstants FREOrientTypeConstants FRCMotionErrorInfo Object Overview Example ‘ Check if this point is within the robot’s reachDim objIPos as FRCIndPositionIf objIPos.IsReachable then MsgBox "This position is within the robot’s reach"Else MsgBox "The robot will not be able to reach this position"End If FRCPosition.UserTool Property Description Returns/sets the User Tool to which the position is referenced. Syntax [lngTool = ]objPos.UserTool Parts objPos as FRCPosition lngTool as Long Remarks This property can only be set if the position is a teach pendant position (FRCGroupPosition) or an independent position (FRCIndGroupPostition). The property can be read for all positions. For FRCCurGroupPosition objects this property will return the currently selected User Tool on the controller. See Also FRCPosition Object Overview Example ‘ Check a TP position user tool setting ‘ and change to user tool 1 Dim objGrpPos as FRCGroupPosition If objGrpPos.UserTool <> 1 then objGrpPos.UserFrame = 1 End If FRCPosition Methods FRCPosition.CheckReach Method Description Returns a Boolean indicating if the robot can reach the position or not. Syntax [blnTest = ]objPos.CheckReach( [objFromPos [, enuMotype [, enuOrientType [, objDestPos [, objMoErrInfo ]]]]] ) Parts blnTest as Boolean objPos as { FRCPosition | FRCGroupPosition | FRCIndGroupPosition | FRCSysGroupPosition | FRCVarPosition } objFromPos as { FRCGroupPosition | FRCIndGroupPosition | FRCIndPosition | FRCPosition | FRCSysPosition | FRCSysGroupPosition | FRCTPPosition | FRCVarPosition } enuMotype as FREMotionTypeConstants enuOrientType as FREOrientTypeConstants objDestPos as { FRCGroupPosition | FRCIndGroupPosition | FRCIndPosition | FRCPosition | FRCSysPosition | FRCSysGroupPosition | FRCTPPosition | FRCVarPosition } objMoErrInfo as FRCMotionErrorInfo Remarks This method performs the same function as the IsReachable property. It is provided to overcome a known issue with VB .NET which always returns objMoErrInfo as Nothing when the IsReachable property is used. VB .NET handles Properties and Methods differently. The arguments are provided to give CheckReach information on how the robot will be moving to the point. Where it comes from and how it gets there sometimes has an impact on whether the point will be reachable or not. NOTE: These arguments are only supported when you are connected to a V5.30-3 or V6.20-1 or later robot. CheckReach uses a degraded version of reach checking with earlier robots which does not account for where the robot is coming from. With earlier robots it only checks maximum joint limits and does not account for the joint 2-3 interaction that affects joint limits on some robots. If objFromPos is not provided, only joint angle limit checking will be performed. The scope of objFromPos must be the same or broader than objPos. That is, a multi-group objFromPos will work with the single group objPos as long as that group is enabled in objFromPos. enuMoType is optional and defaults to frJointMotionType. It has no meaning if objFromPos is not provided. Only frJointMotionType and frLinearMotionType are supported. enuOrientType is optional and only used if objFromPos is provided. The only orientation types that have an effect on reachability are frWristJointOrientType and frMinRotationType. These types, in combination with the enuMoType argument determine the arm configuration after the robot moves from objFromPos to the position being checked. ObjDestPos is the position that the robot ends up if it moved from objFromPos to objPos. This may be different in turn numbers or configuration depending on the type of move being made. If you are checking reachability of a sequence of points you should supply this parameter and use it as the objFromPos parameter in the CheckReach check for the subsequent point. objMotionErrorInfo, if provided, enables access to additional information that might be helpful in understanding why the position was declared unreachable. See Also Checking if a point can be reached FRCPosition Object Overview FRCPosition.IsReachable Property FREMotionTypeConstants FREOrientTypeConstants FRCMotionErrorInfo Object Overview Example ‘ Check if this point is within the robot’s reachDim objIPos as FRCIndPositionIf objIPos.CheckReach then MsgBox "This position is within the robot’s reach"Else MsgBox "The robot will not be able to reach this position"End If FRCPosition.StartMonitor Method Description Enables the Change event, with specified latency. Syntax objPos.StartMonitor lngLatency Parts objPos as FRCPosition lngLatency as Long Remarks When called, this method will cause Change events to be generated when the position changes. The lngLatency arguments is used to set the "staleness" of the value, or how long after the position changes before the Change event is generated. It is measured in milliseconds. A smaller number produces a faster response, but adds greater load on the controller. This method may be called more than once by different programs. If called multiple times, the shortest latency time is used for all events. The number of calls is tracked and events are fired until all calls are stopped. For FRCGroupPosition objects, this method will do nothing since monitoring is not required for teach pendant positions. It also has no effect on FRCIndGroupPositon objects. See Also FRCPosition.IsMonitoring Property FRCPosition Object Overview FRCPosition.StopMonitor Method Example ‘ Start monitoring a position for changes ‘ with a latency of a half second Dim objPos as FRCPosition objPos.StartMonitor 500 FRCPosition.StopMonitor Method Description Stops the Change event from occurring. Syntax objPos.StopMonitor Parts objPos as FRCPosition Remarks For more than one call of the StartMonitor method, Change events will still occur until all calls are reversed with this method. This method is also called automatically when all references to this position are destroyed. For FRCGroupPosition objects, this method will do nothing since monitoring is not required for teach pendant positions. It also has no effect on FRCIndGroupPositon objects. See Also FRCPosition.IsMonitoring Property FRCPosition Object Overview FRCPosition.StartMonitor Method Example ‘ Stop monitoring a position Dim objPos as FRCPosition ObjPos.StopMonitor FRCPosition.Uninitialize Method Description Uninitializes the position. Syntax objPos.Uninitialize Parts objPos as FRCPosition Remarks All currently stored positional data will be lost. For FRCCurGroupPosition objects this method will cause a No Write Access exception. See Also FRCPosition.IsInitialized Property FRCPosition Object Overview Example ‘ Uninitialize a position Dim objPos as FRCPosition objPos.Uninitialize FRCPosition Events FRCPosition_Change Event Description Occurs after the position is changed. Syntax objPos_Change() Parts objPos as FRCPosition Remarks Value changes made outside the robot object will not generate this event unless the StartMonitor method has been called. The exceptions are FRCGroupPosition and FRCIndGroupPosition objects whose events are generated regardless of StartMonitor. An FRCIndGroupPosition object generates this event when its Update method is invoked. See Also FRCPosition.IsMonitoring Property FRCPosition Object Overview FRCPosition.StartMonitor Method FRCPosition.StopMonitor Method Example ‘ Setup to monitor position every half second Private WithEvents mobjPosition as FRCPosition mobjPosition.StartMonitor 500 Private Sub mobjPosition_Change() MsgBox "The position has changed" End Sub FRCSysGroupPosition FRCSysGroupPosition Object Overview Description Provides access to the positional data of a controller system position for a specific motion group. Overview The system group position object is an aggregate of the various position formats (XyzWpr, Transform, Joint). The system group position object contains a minimal number of properties that identify the particular position. The remainder of the data must be retrieved from the proper object format. Properties Error! Hyperlink reference not valid. as String Formats (Type as FRETypeCodeConstants) as {FRCXyzWrp | FRCTransform | FRCJoint} (read only) GroupNum as Integer (read-only) Id as Long(read-only) Error! Hyperlink reference not valid. as Boolean(read-only) IsEqualTo(Target as FRCPosition) (read-only) IsInitialized as Boolean (read-only) IsMonitoring as Boolean (read-only) IsReachable( [From as Object [, Motype as FREMotionTypeConstants [, OrientType as FREOrientTypeConstants [, Dest as Object [, MoErrInfo as FRCMotionErrorInfo ]]]]] ) as Boolean (read-only) Parent as FRCSysPosition (read-only) Program as FRCProgram (read-only) Robot as FRCRobot (read-only) Type as FRETypeCodeConstants UserFrame as Long UserTool as Long Methods CheckReach( [From as Object [, Motype as FREMotionTypeConstants [, OrientType as FREOrientTypeConstants [, Dest as Object [, MoErrInfo as FRCMotionErrorInfo ]]]]] ) as Boolean Copy Source as Object MatInv InputPos as Object MatMul LeftPos as Object, RightPos as Object Moveto Record Refresh StartMonitor Latency as Long StopMonitor Uninitialize Update Events Change() Error! Hyperlink reference not valid. See Also FRCSysPosition Object Overview FRCJoint Object Overview FRCPosition Object Overview FRCProgram Object Overview FRCRobot Object Overview FRCTransform Object Overview FRCXyzWpr Object Overview FRETypeCodeConstants Object Overview FRCSysGroupPosition Properties FRCSysGroupPosition.Parent Property Description Returns the parent object. Syntax objSysPos = objSysGrpPos.Parent Parts objSysGrpPos as FRCSysGroupPosition objSysPos as FRCSysPosition Remarks Parent is always of type FRCSysPosition. See Also Error! Hyperlink reference not valid. FRCSysPosition Object Overview Example ‘ Get our parent Dim objSysPos as FRCSysPosition Dim objSysGrpPos as FRCSysGroupPosition Set objSysPos = objSysGrpPos.Parent FRCSysGroupPosition Events FRCSysGroupPosition_CommentChange Event Description Occurs when the position’s comment is changed. Syntax mobjSysGrpPos _CommentChange() Parts Private WithEvents mobjSysGrpPos as FRCSysGroupPosition Remarks Comment changes made outside the robot object will not generate this event. See Also Error! Hyperlink reference not valid. Example ‘ Wait for position changes Private WithEvents mobjSysGrpPos as FRCSysGroupPosition Private Sub mobjSysGrpPos_CommentChange() MsgBox "The position comment has changed to: " & _ mobjSysGrpPos.Comment End Sub FRCSysPosition FRCSysPosition Properties FRCSysPosition.Group Property Description Returns a FRCSysGroupPosition object representing the system position in the specified motion group. Syntax [objGrpPos = ]objSysPos.Group(intGroupNum) Parts objSysPos as FRCSysPosition objGrpPos as FRCSysGroupPosition intGroupNum as Integer Remarks Allows access to position data for the specified motion group through the returned object. See Also FRCSysGroupPosition Object Overview FRCSysPosition Object Overview Example ‘ Get position data for group 1 Dim objSysPos as FRCSysPosition Dim objSysGrpPos as FRCSysGroupPosition Set objSysGrpPos = objSysGrpPos.Group(1) FRCSysPosition.IsAtCurPosition Property Description Returns information about whether the robot is currently at the position. Syntax [blnAtCurPos = ]objSysPos.IsAtCurPosition Parts objSysPos as FRCSysPosition blnAtCurPos as Boolean Remarks If a value of TRUE is returned the robot is considered to be at the position the object represents. Otherwise, the robot is not at the position. All groups defined on the robot must be at the position. See Also FRCSysPosition.MoveTo Method FRCSysPosition Object Overview Example ‘ Check if robot is at a position Dim objSysPos as FRCSysPosition If objSysPos.IsAtCurPosition then MsgBox "Robot is at position" Else MsgBox "Robot is not at position" End if FRCSysPosition Methods FRCSysPosition.Uninitialize Method Description Uninitializes the position for all groups defined on the controller. Syntax objSysPos.Uninitialize Parts objSysPos as FRCSysPosition Remarks All currently stored positional data will be lost. After this method, the IsInitialized property will return a value of FALSE. See Also FRCSysPosition.IsInitialized Property FRCSysPosition Object Overview Example ‘ Uninitialize a position Dim objSysPos as FRCSysPosition objSysPos.Uninitialize FRCSysPosition Events FRCSysPosition_Change Event Description Occurs when the position is changed, GroupNum specifies which group was changed. Syntax objSysPos_Change(GroupNum as Integer) Parts objSysPos as FRCSysPosition Remarks Value changes made outside the robot object will not generate this event unless the StartMonitor method has been called on the FRCSysGroupPositon object. See Also FRCSysPosition Object Overview FRCSysGroupPosition Object Overview FRCSysGroupPosition StartMonitor Method FRCSysGroupPosition StopMonitor Method Example ‘ Wait for position changes Private WithEvents mobjSysPos as FRCSysPosition Private Sub mobjSysPos_Change(GroupNum as Integer) MsgBox "The position has changed in group: " & _ CStr(GroupNum) End Sub FRCSysPosition_CommentChange Event Description Occurs when a position’s comment is changed. Syntax objSysPos_CommentChange(GroupNum as Integer) Parts objSysPos as FRCSysPosition Remarks GroupNum specifies which group was changed. Comment changes made outside the robot object will not generate this event. See Also FRCSysPosition Object Overview Example ‘ Wait for position changes Private WithEvents mobjSysPos as FRCSysPosition Private Sub mobjSysPos_CommentChange(GroupNum as Integer) MsgBox "The position comment has changed to: " & _ mobjSysPos.Group(GroupNum).Comment End Sub FRCSysPositions FRCSysPositions Properties FRCSysPositions.Count Property Description Returns the number of positions contained in the collection. Syntax [lngCount = ]objSysPositions.Count Parts lngCount as Long objSysPositions as FRCSysPositions Remarks none See Also FRCSysPositions Object Overview Example ‘ Get number of positions in collection Dim objSysPositions as FRCSysPositions Dim lngCount as Long lngCount = objSysPositions.Count FRCSysPositions.Item Property Description Returns a position from the collection. Syntax [objSysPos = ]objSysPositions.Item({lngId | lngIndex}) Parts objSysPos as FRCSysPosition objSysPositions as FRCSysPositions lngId as Long lngIndex as Long Remarks The Item property returns an object of type FRCSysPosition. This object can then be used to further query or modify the data specific to a particular position. The position can be identified by the position Id or by the index in the collection. See Also FRCSysPosition Object Overview FRCSysPositions Object Overview Example ‘ Get a system position from the collection ‘ by ID and Index Dim objSysPositions as FRCSysPositions Dim objSysPosID as FRCSysPosition Dim objSysPosIdx as FRCSysPosition ‘ Get system position by ID Set objSysPosID = objSysPositions.Item(1) ‘ Get system position by Index Set objSysPosIdx = objSysPositions.Item(Index:=0) FRCSysPositions.Selected Property Description Returns/sets the selected active frame. Syntax [lngSelected = ]objSysPositions.Selected(intGroupNum) Parts lngSelected as Long objSysPositions as FRCSysPositions intGroupNum as Integer Remarks Gets or sets the proper system variables on the robot controller for the appropriate frame. This property does not work for position registers. See Also FRCSysPositions Object Overview Example ‘ Set selected UTool and Uframe Dim objUTools as FRCSysPositions Dim objUFrames as FRCSysPositions Dim objJogFrames as FRCSysPoitions objUTools.Selected = 2 objUFrames.Selected = 1 objJogFrames.Selected = 1 FRCSysPostions Methods FRCSysPositions.Update Method Description Sends the local copy of the position registers, tool frames, user frames, or jog frames to the robot. Syntax objSysPosns.Update Parts objSysPosns as FRCSysPositions Remarks The data, including comments, for system positions controlled by this object are sent to the robot as efficiently as possible. Use this when you want to make changes to several system positions simultaneously. The FRCSysPositions class does not have a NoUpdate property. However, it works as if NoUpdate = TRUE. See Also FRCSysPositions Object Overview FRCSysPosition.Update Method Optimizing Data Access Example ' ' This routine is called after making several changes to ' several ToolFrames that were not updated individually. ' Private Sub ApplyUTool() Dim objUTools As FRCSysPositions Set objUTools = mobjRobot.ToolFrames ' ' Update all ToolFrames objUTools.Update End Sub FRCSysPositions Events FRCSysPositions_Change Event Description Occurs when a position is changed. Syntax objSysPositions_Change(Id as Long, GroupNum as Integer) Parts objSysPositions as FRCSysPositions Remarks Id and GroupNum specify which position was changed. Value changes made outside the robot object will not generate this event unless the StartMonitor method has been called on the FRCSysGroupPositon object. See Also FRCSysPositions Object Overview Error! Hyperlink reference not valid. FRCSysGroupPosition StartMonitor Method FRCSysGroupPosition StopMonitor Method Example ‘ Wait for position changes Private WithEvents mobjSysPositions as FRCSysPositions Private Sub mobjSysPositions_Change(ByVal Id as Long, _ ByVal GroupNum as Integer) MsgBox "A position has changed – Id: " & _ CStr(Id) & " Grp: " & CStr(GroupNum) End Sub FRCTPPosition FRCTPPosition Properties FRCTPPosition.IsAtCurPosition Property Description Returns information about whether the robot is currently at the teach pendant position. Syntax [blnAtCurPos = ]objTPPos.IsAtCurPosition Parts objTPPos as FRCTPPosition blnAtCurPos as Boolean Remarks Queries to see if the position is the same as the current location of the robot for all groups defined for the teach pendant Position. TRUE means that this position is the same as the robot position; FALSE means it is not. See Also FRCTPPosition.MoveTo Method FRCTPPosition Object Overview Example ‘ Check if robot is at this position Dim objTPPos as FRCTPPosition If objTPPos.IsAtCurPosition then MsgBox "Robot is at position" Else MsgBox "Robot is not at position" End If FRCTPPosition.ReferenceCount Property Description Returns the reference count of the teach pendant position. Syntax [lngCount = ]objTPPos.ReferenceCount Parts objTPPos as FRCTPPosition lngCount as long Remarks The position’s reference count is incremented by 1 for each motion line that refers to the position. The reference count is used internally to remove a position when the reference count becomes 0. See Also FRCTPPosition Object Overview Example ‘ Get how many references to the position exists Dim objTPPos as FRCTPPosition Dim lngCount as Long lngCount = objTPPos.ReferenceCount FRCTPPosition Events FRCTPPosition_Change Event Description Occurs after a teach pendant position is changed. Syntax objTPPos_Change(GroupNum as Integer) Parts objTPPos as FRCTPPosition Remarks GroupNum is not functional. It always returns 0. If any of the groups in a teach pendant position is changed, the event occurs. A teach pendant position changed outside the robot object will always generate this event. StartMonitor is not required. See Also FRCTPPosition Object Overview Example ‘ Wait for position changes Private WithEvents mobjTPPos as FRCTPPosition Private Sub mobjTPPos_Change(GroupNum as Integer) MsgBox "The TP position with the Id of " & _ CStr(mobjTPPos.Id) & " has changed" End Sub FRCTPPosition.Delete Event Description Occurs before a teach pendant position is deleted. Syntax objTPPos_Delete() Parts objTPPos as FRCTPPosition Remarks After this event, the teach pendant position is removed from the collection and the teach pendant program. However, if any references to the position still exist then the object will not be deleted and further operations on the position object will generate errors. A teach pendant position deleted outside the robot object will always generate this event. StartMonitor is not required. See Also FRCTPPosition Object Overview FRCTPPositions.Delete Event Example ‘ Capture delete event Private WithEvents mobjTPPos as FRCTPPosition Private Sub mobjTPPos_Delete() MsgBox "The TP position with the Id of " & _ CStr(mobjTPPos.Id) & " will be deleted" End Sub FRCTPPositions FRCTPPositions Properties FRCTPPositions.Count Property Description Returns the number of teach pendant positions contained in the collection (and therefore, in the teach pendant program). Syntax [lngCount = ]objTPPositions.Count Parts lngCount as Long objTPPositions as FRCTPPositions Remarks The Count property can be used to loop through all the teach pendant positions in the collection, however, it us generally better to enumerate the positions using the "for each" VB syntax. Note: The .Count property has nothing to do with the position IDs. This is merely the number of positions in the collection. See Also FRCTPPositions Object Overview Example ‘ Figure out the number of positions Dim objTPPositions as FRCTPPositions Dim lngCount as Long LngCount = objTPPositions.Count FRCTPPositions.Item Property Description Returns a teach pendant position from the collection. Syntax [objTPPos = ]objTPPositions.Item({lngPosId | lngIndex}) Parts objTPPos as FRCTPPosition objTPPositions as FRCTPPositions lngPosId as Long lngIndex as Long Remarks This is the default property for the collection object. When iterating the collection using the "for each" or Item methods the positions are always returned sorted by their id number (the collection is sorted by position id). The Item property returns an object of type FRCTPPosition. This object can then be used to further query or modify the data specific to a particular position. The position can be identified by the position Id or by the index in the collection. See Also FRCTPPosition Object Overview FRCTPPositions Object Overview Example ‘ Get positions by Id and Index Dim objTPPositions as FRCTPPositions Dim objTPPosId as FRCTPPosition Dim objTPPosIdx as FRCTPPosition ‘ Get position by Id Set objTPPosId = objTPPositions.Item(1) ‘ Get position by Index Set objTPPosIdx = objTPPositions.Item(Index:=3) FRCTPPositions Events FRCTPPositions_BeginRenumberAll Event Description Occurs when a renumbering of all positions in a program has begun Syntax objTPPositions_BeginRenumberAll() Parts objTPPositions as FRCTPPositions Remarks The TPP editor has an edit command that you can use to renumber all the positions in the program being edited. Prior to V8.20, this would generate an FRCTPPositions.Renumber event for every position affected. Starting with V8.20, the FRCTPPositions_BeginRenumberAll event will be raised when the process begins and the FRCTPPositions_EndRenumberAll event will be raised when it completes. No FRCTPPositions.Renumber event will be raised. When your application receives the FRCTPPositions_BeginRenumberAll event, all existing references to FRCTPPosition objects for this program will be invalid. Wait for the FRCTPProgram_Refresh or FRCPrograms_Refresh event to acquire new FRCTPPosition objects for the renumbered positions. See Also FRCTPPosition Object Overview FRCTPPositions Object Overview Error! Hyperlink reference not valid. FRCTPProgram_Refresh Event FRCPrograms_Refresh Event Example ‘ Monitor for position renumbering Private WithEvents mobjTPPositions As FRCTPPositions Private Sub mobjTPPositions_BeginRenumberALL() MsgBox "All TP Positions are being renumbered" ‘ You may want to set a flag so that your application ‘ does not try to work with positions at this time. End Sub FRCTransform FRCTransform Object Overview Description Represents the position of a single group of axes as a transformation matrix consisting of normal, orient, approach, and location vectors, and a component specifying a configuration. Overview Positions act like variables with the NoRefresh property set to TRUE. New position data is read only when the position is first accessed, or the Refresh method is called on the FRCPosition object or one of its parents. The position format as stored in a teach pendant (.TP) or variable (.VR) program is not changed by accessing any of the properties or methods of this object. Properties Approach as FRCVector (read-only) Config as FRCConfig (read-only) Ext as FRCAxesCollection (read-only) Location as FRCVector (read-only) Normal as FRCVector (read-only) Orient as FRCVector (read-only) Parent as FRCPosition (read-only) Program as FRCProgram (read-only) Robot as FRCRobot (read-only) Methods none Events none FRECurPositionConstants frUserDisplayType Description Used to return the current position in User coordinates. Remarks The position will be returned with User and Tool frames applied. Regardless of the specified display type, the position can be retrieved in any format (XyzWpr, Joint, or Transform). You must use frUserDisplayType to retrieve the Cartesian coordinates with User frame applied. See Also FRCCurPosition Object Overview FRCCurPosition.Group Property FRECurPositionConstants Overview FREOrientTypeConstants frWristJointOrientType Description Wrist-Joint orientation interpolation Remarks Use this constant when you set of check the Orient type of a Path node segment through the FRCGroupAssoc.SegOrientType property. See Also FREOrientTypeConstants Error! Hyperlink reference not valid. Alarms FRCAlarm FRCAlarm Object Properties FRCAlarm.CauseMessage Property Description Returns the message string describing the alarm cause. Syntax [strCauseMessage =] Alarm.CauseMessage Parts strCauseMessage as String Alarm as FRCAlarm Remarks none See Also FRCAlarm Object Overview FRCAlarms Object Overview Example ’Example of getting the cause message for an ’alarm Dim strCauseMessage as String Dim objAlarm as FRCAlarm strCauseMessage = objAlarm.CauseMessage FRCAlarm.ErrorClass Property Description Returns the type of alarm as FREAlarmSeverityConstants. Syntax Value = Alarm.ErrorClass Parts Value as Long Alarm as FRCAlarm Remarks The value will be frErrorNormal, frErrorReset, frErrorClear, or frErrorClearAll. This is useful for the AlarmNotify event handlers. Often, the object receiving this alarm in an event must take different actions depending on what type of alarm has occurred. In the alarm log, the frErrorReset and frErrorClear alarms are present so their timestamp can be used to determine when these events occurred. This is an enumerated value that indicates the type of alarm. It has the following values: Name Description frErrorNormal Normal alarms frErrorReset Reset Alarm frErrorClear Clear (active) Alarm frErrorClearAll Clear All (whole log) Alarm See Also FRCAlarm Object Overview FRCAlarms Object Overview Example ’Example of getting the error class for an ’alarm Dim lngErrorClass as Long Dim objAlarm as FRCAlarm intErrorClass = objAlarm.ErrorClass FRCAlarm.ErrorExecution Property Description Returns the field of ErrorSeverity that determines how the alarm affects program execution. Syntax [lErrorSeverity =] Alarm.ErrorExecution Parts lErrorSeverity as Long Alarm as FRCAlarm Remarks This property can have the value of frSevExAbort, frSevExDebug, frSevExNone, or frSevExPause. See Also FRCAlarm Object Overview FRCAlarms Object Overview Example ’Example of getting the error severity for an ’alarm Dim lngErrorClass as Long Dim objAlarm as FRCAlarm lngErrorClass = objAlarm.ErrorExecution FRCAlarm.ErrorFacility Property Description Returns the Error Facility Code for the alarm. Syntax [lErrorFacility =] Alarm.ErrorFacility Parts lErrorFacility as Long Alarm as FRCAlarm Remarks none See Also FRCAlarm Object Overview FRCAlarms Object Overview Example ’Example of getting the error facility for an ’alarm Dim lngErrorFacility as Long Dim objAlarm as FRCAlarm lngErrorFacility = objAlarm.ErrorFacility FRCAlarm. ErrorMessage Property Description Returns the Error Message for the alarm. Syntax [ErrorMessage =] Alarm.ErrorMessage Parts ErrorMessage as String Alarm as FRCAlarm Remarks none See Also FRCAlarm Object Overview FRCAlarms Object Overview Example ’Example of getting the error message for an ’alarm Dim strErrorMessage as String Dim objAlarm as FRCAlarm strErrorMessage = objAlarm.ErrorMessage FRCAlarm.ErrorMnemonic Property Description Returns the Error Facility Code Mnemonic string for the alarm. Syntax [ErrorMnemonic =] Alarm.ErrorMnemonic Parts ErrorMnemonic as String Alarm as FRCAlarm Remarks none See Also FRCAlarm Object Overview FRCAlarms Object Overview Example ’Example of getting the error facility code mnemonic ’for an alarm Dim strErrorMnemonic as String Dim objAlarm as FRCAlarm strErrorMnemonic = objAlarm.ErrorMnemonic FRCAlarm.ErrorSeverity Property Description Returns the alarm severity. Syntax [ErrorSeverity =] Alarm.ErrorSeverity Parts ErrorSeverity as FREAlarmSeverityConstants Alarm as FRCAlarm Remarks This property can have the value of frSevAbort, frSevAbortL, frSevNone, frSevPause, frSevPauseL, frSevServo, frSevServo2, frSevStop, frSevSystem, or frSevWarn See Also FRCAlarm Object Overview FRCAlarms Object Overview Example ’Example of getting the error number ’for an alarm Dim ErrorSeverity as FREAlarmSeverityConstants Dim objAlarm as FRCAlarm ErrorSeverity = objAlarm.ErrorSeverity FRCAlarms FRCAlarms Object Properties FRCAlarms.Item Property Description Returns a particular FRCAlarm object from the alarm log. Syntax [objAlarm = ]objAlarmLog.Item(lngAlarmIndex) Parts objAlarmLog as FRCAlarms objAlarm as FRCAlarm lngAlarmIndex as Long Remarks The desired alarm object is specified by its position in the collection. For example, an index of one will return the first alarm in the collection. The alarms collection is organized with the most recent alarm at index one, and the oldest alarm at index Alarms.Count. The index value can change as new alarms are received. Therefore, it is not a good idea to store the index of an alarm. If you do, you must update the value each time an alarm occurs. It is better to store a reference to the alarm object itself. The alarm’s Index value is a property of the alarm object, and is automatically updated as new alarms are received. See Also FRCAlarms Object Overview FRCAlarm Object Overview Example ’Get the most recent alarm object Dim objMyAlarms as FRCAlarms Dim objNewestAlarm as FRCAlarm Dim objOldestAlarm as FRCAlarm Dim lngNumAlarms as Long Set objNewestAlarm = objAlarms.Item(1) ’Get the oldest alarm object lngNumAlarms = FRCAlarms.Count Set objOldestAlarm = objMyFeatures.Item(lngNumAlarms) FRCAlarms.Max Property Description Returns/sets the maximum number of alarms the log will hold. Syntax [lngMax = ]objAlarmLog.Max Parts lngMax as Long objAlarmLog as FRCAlarms Remarks If the property is set to a value less that the current number of alarms collected, the oldest alarms beyond the maximum will be discarded. After they are discarded, they can not be recovered. The default value is 100. See Also FRCAlarms Object Overview FRCAlarm Object Overview Example ’ Set the alarm log to hold 200 alarms Dim objMyAlarms as FRCAlarms Set objMyAlarms = gobjRobot.Alarms objMyAlarms.Max = 200 FRCAlarms Object Methods FRCAlarms.Reset Method Description Issues a RESET command to the controller. Syntax objAlarms.Reset Parts objAlarms as FRCAlarms Remarks When the robot is in a fault state, a RESET will cause the controller to attempt to clear the faults. If faults still exist the controller will remain in the fault state. See Also FRCAlarms Object Overview Example ’ Reset the controller Dim objMyAlarms as FRCAlarms Set objMyAlarms = gobjRobot.Alarms objMyAlarms.Reset FREAlarmSeverity Constants FREAlarmSeverityConstants Overview Description An enumeration of constants used for Alarms. Overview These constants are used to identify the different types of alarm severity codes, masking options, and other parameters when interpreting an FRCAlarm alarm object. These constants are grouped as follows: frError… FRCAlarm.ErrorClass values frSevEx… FRCAlarm.ErrorExecution values frSevMo… FRCAlarm.ErrorMotion values frSev… FRCAlarm.ErrorSeverity values The frSev… indicate how the alarm effects the robot, from lowest to highest priority: frSevNone Alarm is not displayed on the Teach Pendant frSevWarn Alarm is displayed on the Teach Pendant frSevPause, Program execution is paused. frSevPauseL frSevStop, Programs are paused and motion is stopped frSevStopL frSevAbort, Programs are aborted and motion is canceled frSevAbortL frSevServo Programs are paused and servos are off frSevServo2 Programs are aborted and servos are off frSevSystem Requires power to be cycled to clear The frSev… constants are also used in the FRCRobot.PostAlarm method to set the alarm severity. Values frErrorClear frErrorClearAll frErrorNormal frErrorReset frSevAbort frSevAbortL frSevExAbort frSevExDebug frSevExMask frSevExNone frSevExPause frSevMoCancel frSevMoMask frSevMoNone frSevMoStop frSevNone frSevPause frSevPauseL frSevServo frSevServo2 frSevStop frSevStopL frSevSystem frSevWarn See Also FRCRobot.PostAlarm Method frErrorReset Description Error class: reset Remarks This is used to indicate that this FRCAlarm object performed a RESET operation. See Also FRCAlarm.ErrorClass Property FREAlarmSeverityConstants Overview frSevAbortL Description Severity: local abort Remarks This is used to indicate that this FRCAlarm object caused a Local Abort operation, or to set the alarm severity to Local Abort for the posted alarm. See Also FRCAlarm.ErrorSeverity Property FRCRobot.PostAlarm Method FREAlarmSeverityConstants Overview frSevExAbort Description Execution: abort Remarks This is used to indicate that this FRCAlarm object forced execution to Abort. See Also FRCAlarm.ErrorExecution Property FREAlarmSeverityConstants Overview frSevExDebug Description Execution: debug Remarks This is used to indicate that this FRCAlarm object forced execution to Debug. See Also FRCAlarm.ErrorExecution Property FREAlarmSeverityConstants Overview frSevExMask Description Execution mask Remarks This constant is a mask for FRCAlarm.ErrorSeverity to extract the execution bits. This constant is rarely used since the execution bits are already extracted in FRCAlarm.ErrorExecution Property. See Also FRCAlarm.ErrorExecution Property FREAlarmSeverityConstants Overview frSevExNone Description Execution: no effect Remarks This is used to indicate that this FRCAlarm object did not affect program execution. See Also FRCAlarm.ErrorExecution Property FREAlarmSeverityConstants Overview frSevExPause Description Execution: pause Remarks This is used to indicate that this FRCAlarm object forced execution to Pause. See Also FRCAlarm.ErrorExecution Property FREAlarmSeverityConstants Overview frSevPause Description Severity: pause Remarks This is used to indicate that this FRCAlarm object caused program execution to Pause, or to set the posted alarm severity to pause program. See Also FRCAlarm.ErrorSeverity Property FRCRobot.PostAlarm Method FREAlarmSeverityConstants Overview frSevServo Description Severity: servo Remarks This is used to indicate that this FRCAlarm object caused servo power to shut off, or to set the posted alarm severity to shut off servo power. See Also FRCAlarm.ErrorSeverity Property FRCRobot.PostAlarm Method FREAlarmSeverityConstants Overview frSevStopL Description Severity: local stop Remarks This is used to indicate that this FRCAlarm object to perform a Local Motion Stop operation, or to set the posted alarm severity to stop local motion. See Also FRCAlarm.ErrorSeverity Property FRCRobot.PostAlarm Method FREAlarmSeverityConstants Overview I/O FRCIOConfig FRCIOConfig Object Properties FRCIOConfig.FirstLogicalNum Property Description Returns the first logical signal number of a configuration. Syntax lngFirstLogicalNum = objIOConfig.FirstLogicalNum Parts lngFirstLogicalNum As Long objIOConfig As FRCIOConfig Remarks This is the logical number of the first signal in the configuration. For analog and group types, it is the signal number. See Also FRCIOConfig Object Overview FRCIOConfigs Object Overview FRCIOConfigs.Item Property FRCIOSignal.LogicalNum Property Example ‘ This example retrieves the FirstLogicalNum of the ‘ first config in the collection of digital inputs Dim objIOConfigs As FRCIOConfigs Dim objIOConfig As FRCIOConfig Dim lngFLN As Long ‘ first get the collection Set objIOConfigs = gobjRobot.IOTypes(frDInType).Configs ‘ get the first config in the collection by index Set objIOConfig = objIOConfigs(Index:=0) ‘ get the FirstLogicalNum lngFLN = objIOConfig.FirstLogicalNum FRCIOConfig.FirstPhysicalNum Property Description Returns/sets the number of the physical port to which the property is assigned. Returns/sets the least-significant bit for the group I/O type. Syntax lngFirstPhysicalNum = objIOConfig.FirstPhysicalNum Parts lngFirstPhysicalNum As Long objIOConfig As FRCIOConfig Remarks This property is the number of the port assigned to the lowest numbered signal in the configuration. See Also FRCIOConfig Object Overview Error! Hyperlink reference not valid. Example ‘ This example retrieves the FirstPhysicalNum of the ‘ first config in the collection of digital inputs Dim objIOConfigs As FRCIOConfigs Dim objIOConfig As FRCIOConfig Dim lngFPN As Long ‘ first get the collection Set objIOConfigs = gobjRobot.IOTypes(frDInType).Configs ‘ get the first config in the collection by index Set objIOConfig = objIOConfigs(Index:=0) ‘ get the FirstPhysicalNum lngFPN = objIOConfig.PhysicalType FRCIOConfig Object Events FRCIOConfig_Delete Event Description Occurs before the configuration is deleted. Syntax mobjIOConfig_Delete() Parts mobjIOConfig As FRCIOConfig Remarks This event is automatically generated whenever a configuration is deleted. The configuration is removed from the controller before the event occurs. The FRCIOConfig object is removed from the collection and deleted after the event occurs. Any attempt to use this object after it is deleted will cause an "Object is no longer valid" run-time error. This event also occurs, followed by a Create event on FRCIOConfigs, when a property of a configuration in the collection changes via the controller or another Robot Object. See Also FRCIOConfig Object Overview FRCIOConfigs Object Overview FRCIOConfigs_Delete Event FRCIOConfigs.Remove Method Example ‘ This example shows declaring an object ‘ with event handlers and using the event handler ‘ to tell the user when the configuration has been ‘ deleted Private WithEvents mobjIOConfig As FRCIOConfig Dim objIOConfigs As FRCIOConfigs ‘ get the collection Set objIOConfigs = gobjRobot.IOTypes(frDInType).Configs ‘ get the configuration object Set mobjIOConfig = objIOConfigs(Index:=0) ‘ Delete the configuration objIOConfigs.Remove Index:=0 ‘ Event Handler Private Sub mobjIOConfig_Delete() MsgBox "This configuration has been deleted" End Sub FRCIOConfigs FRCIOConfigs Object Properties FRCIOConfigs.Count Property Description Returns the number of configurations contained in the collection. Syntax [lngCount = ]objIOConfigs.Count Parts lngCount As Long objIOConfigs As FRCIOConfigs Remarks The Count property can be used to loop through all the configurations in the collection, however, it is generally better to enumerate the configurations using the "for each" VB syntax. See Also FRCIOConfigs Object Overview FRCIOConfigs.Item Property Example ‘ Get the number of digital input configurations Dim objIOType As FRCIOType Dim objIOConfigs As FRCIOConfigs Dim lngCount As Long Set objIOType = gobjRobot.IOTypes(frDInType) Set objIOConfigs = objIOType.Configs lngCount = objIOConfigs.Count FRCIOConfigs.Item Property Description Returns a configuration from the collection. Syntax [Set objIOConfig = ]objIOConfigs.Item({lngFirstLogicalNum | lngIndex}) Parts objIOConfig As FRCIOConfig objIOConfigs As FRCIOConfigs lngFirstLogicalNum As Long lngIndex As Long Remarks The Item property returns an object of type FRCIOConfig. This object can then be used to further query or modify the configuration. The object can be identified by the first logical number (FirstLogicalNum:=n) or by the index (Index:=n) in the collection. If a number is given without indicating FirstLogicalNum or Index, it will be treated as a first logical number. The index is zero-based. This is the default property for the collection object. Therefore, ".Item" can be excluded. See Also FRCIOConfigs Object Overview FRCIOConfig Object Overview Error! Hyperlink reference not valid. Example ’ This example gets a digital input configuration. Dim objIOType As FRCIOType Dim objIOConfigs As FRCIOConfigs Dim objIOConfig1 As FRCIOConfig Dim objIOConfig2 As FRCIOConfig Set objIOType = gobjRobot.IOTypes(frDInType) Set objIOConfigs = objIOType.Configs ’ Using the configuration’s FirstLogicalNumber and ’ including ".Item" Set objIOConfig1 = objIOConfigs.Item(9) ’ Get the second configuration in the collection ’ Using the configuration’s index in the collection ’ and excluding ".Item" Set objIOConfig2 = objIOConfigs(Index:=1) FRCIOConfigs Object Events FRCIOConfigs_Create Event Description Occurs after a configuration is created. Syntax mobjIOConfigs_Create(IOConfig As FRCIOConfig) Parts mobjIOConfigs As FRCIOConfigs Remarks This event occurs when a configuration is added using the Add method. It is passed a reference to the new FRCIOConfig object. When the controller changes a configuration or another Robot Object, then the configuration is deleted and recreated. Therefore this event might also occur, following a Delete event when a configuration property in the collection changes. See Also FRCIOConfig Object Overview FRCIOConfigs Object Overview FRCIOConfigs.Add Method FRCIOConfigs_Delete Event Example ‘ Get the FirstLogicalNum of any added configuration ‘ Private WithEvents mobjIOConfigs As FRCIOConfigs Dim mlngFirstLogicalNum As Integer ‘ Call Add without the first logical number ‘ so it is automatically generated mobjIOConfigs.Add Private Sub mobjIOConfigs_Create(ByVal IOConfig As FRCIOConfig) ‘ Store the FirstLogicalNum mlngFirstLogicalNum = IOConfig.FirstLogicalNum End Sub FRCIOConfigs_Delete Event Description Occurs after a configuration is deleted. Syntax mobjIOConfigs_Delete(ByVal IOConfig As FRCIOConfig) Parts mobjIOConfigs As FRCIOConfigs Remarks This event is automatically generated whenever a configuration is deleted. The configuration is removed from the controller and from the collection before the event occurs. The FRCIOConfig object is deleted after the event occurs. Any attempt to use this object after it is deleted will cause an "Object is no longer valid" run-time error. This event also occurs, followed by a Create event, when a property of a configuration in the collection changes via the controller or another Robot Object. See Also FRCIOConfig Object Overview FRCIOConfig_Delete Event FRCIOConfigs Object Overview FRCIOConfigs.Remove Method FRCIOConfigs_Create Event Example ‘ Get the FirstLogicalNum of any removed ‘ configuration Private WithEvents mobjIOConfigs As FRCIOConfigs Dim mlngFirstLogicalNum As Integer ‘ Call Remove using the index mobjIOConfigs.Remove Index:=0 Private Sub mobjIOConfigs_Delete(IOConfig As _ FRCIOConfig) ‘ Store the FirstLogicalNum mlngFirstLogicalNum = IOConfig.FirstLogicalNum End Sub FRCxxxIOSignal FRCDigitalIOSignal Object Overview FRCDigitalIOSignal Object Overview Description Represents a specific digital I/O signal object. Overview Use this object to monitor and control an digital input or output signal. Properties Comment As String Error! Hyperlink reference not valid. As Boolean IsAssigned As Boolean (read-only) IsMonitoring as Boolean (read only) IsOffline As Boolean (read-only) LogicalNum As Long (read-only) NoRefresh as Boolean NoUpdate as Boolean Parent As FRCIOSignals (read-only) Polarity As Boolean Robot As FRCRobot (read-only) Simulate As Boolean Value As Boolean Methods Refresh() StartMonitor(Latency As Long) StopMonitor( ) Update() Events Change() Delete() Simulate() Unsimulate() FRCDigitalIOSignal Object Properties FRCDigitalIOSignal.Complementary Property Description Returns/sets the complementary status of an output signal. Syntax [blnValue = ]objIOSignal.Complementary Parts blnValue As Boolean objIOSignal As FRCDigitalIOSignal Remarks This property can be used to determine if a signal is a member of a complementary pair. The complementary status can also be set. A value of TRUE means the signal is in a complementary pair. Signals with an odd logical number are complemented with the next higher signal, while signals with an even logical number are complemented with the next lower signal. See Also FRCDigitalIOSignal Object Overview FRCDigitalIOSignal.Value Property Error! Hyperlink reference not valid. FRCIOSignal Object Overview Example ‘ This example complements a signal ‘ and changes the value of both signals Dim objIOSignals As FRCIOSignals Dim objIOSignal As FRCDigitalIOSignal ‘ first get the Digital output collection Set objIOSignals = _ gobjRobot.IOTypes(frDOutType).Signals ‘ get the signal, logical number is 1 Set objIOSignal = objIOSignals(1) ‘ complement the signal objIOSignal.Complementary = True ‘ change the value ‘ setting this signal high sets ‘ digital output signal 2’s value low objIOSignal.Value = True FRCGroupIOSignal Object Overview FRCGroupIOSignal Object Overview Description Represents a specific group I/O signal. Overview Use this object to monitor and control a group input or output signal. Properties Comment As String IsAssigned As Boolean (read-only) IsMonitoring as Boolean (read only) IsOffline As Boolean (read-only) LogicalNum As Long (read-only) NoRefresh as Boolean NoUpdate as Boolean Parent As FRCIOSignals (read-only) Robot As FRCRobot (read-only) Simulate As Boolean Value As Long Methods Refresh() StartMonitor(Latency As Long) StopMonitor( ) Update() Events Change() Delete() Simulate() Unsimulate() FRCGroupIOSignal Object Properties FRCGroupIOSignal.Parent Property Description Returns the owning Signals collection Syntax objIOSignals = IOxxxSignal.Parent Parts objIOSignals As FRCIOSignals objIOSignal As FRCGroupIOSignal Remarks This property returns the FRCIOSignals collection object from which the signal originated. See Also FRCIOGroupSignal Object Overview FRCIOSignals Object Overview FRCIOSignals.Item Property Example ‘ This example gets a signal’s parent ‘ IOSignals object Dim objIOSignals1 As FRCIOSignals Dim objIOSignals2 As FRCIOSignals Dim objIOSignal As FRCGroupIOSignal ‘ get an Group IO Signals collection Set objIOSignals1 = gobjRobot.IOTypes(frGPInType) ‘ get a signal Set objIOSignal = objIOSignals1(Index:=0) ‘ objIOSignals1 and objIOSignals2 will ‘ refer to the same object Set objIOSignals2 = objIOSignal.Parent FRCIOSignal Object Overview FRCIOSignal Object Properties FRCIOSignal.IsMonitoring Property Description Returns information on whether the signal is being monitored. Syntax [blnIsMonitoring = ]objIOSignal.IsMonitoring Parts objIOSignal as FRCIOSignal blnIsMonitoring as Boolean Remarks This property is TRUE if signal monitoring is currently turned on; it is FALSE if signal monitoring is currently turned off. The StartMonitor and StopMonitor methods are used to control monitoring. This property is inherited by the specific type I/O signal objects. See Also FRCIOSignal Object Overview FRCIOSignal_Change Event FRCIOSignal.StartMonitor Method FRCIOSignal.StopMonitor Method FRCIOSignals.IsMonitoring Property FRCIOSignals.StartMonitor Method FRCIOSignals.StopMonitor Method Example ‘ This example starts and stops monitoring ‘ of the first signal in the ‘ collection of digital inputs Dim objIOSignals As FRCIOSignals Dim objIOSignal As FRCIOSignal Dim blnMonitoring As Boolean ‘ first get the collection Set objIOSignals = _ gobjRobot.IOTypes(frDInType).Signals ‘ get the first signal in the collection Set objIOSignal = objIOSignals(Index:=0) ‘ start monitoring with half-second latency objIOSignal.StartMonitor 500 ‘ value of IsMonitoring will be True blnMonitoring = objIOSignal.IsMonitoring ‘ turn monitoring off objIOSignal.StopMonitor ‘ value of IsMonitoring will be False blnMonitoring = objIOSignal.IsMonitoring FRCIOSignal.NoRefresh Property Description Returns/sets the flag that controls whether data is read directly from the robot or from Robot Server memory when the Comment, Complementary, Polarity, Simulate or Value property is read. Syntax objObjectIOSignal.NoRefresh[ = blnTorF] Parts objObjectIOSignal as FRCIOSignal blnTorF as Boolean Remarks Setting the NoRefresh property = True on an I/O signal tells the Robot Server to read and remember the robot’s current data for the I/O signal and return that information each time one of the following properties is read: Comment Complementary Polarity Simulate Value Subsequent reads of these properties are much faster because the robot is not accessed again. This is a useful tool for improving your application’s performance when you know when the I/O signal is expected to change. It is also important to use this feature when using the FRCScatteredAccess object in conjunction with and I/O signal. The FRCIOSignal.Fresh method can be used to refresh this data with one network call. The current value for this signal is read from the robot at the time the NoRefresh property is set to TRUE. This feature requires an R-J3 controller version of V5.22 or higher. See Also FRCIOSignal Object Overview FRCIOSignal.NoUpdate Property FRCIOSignal.Refresh Method FRCScatteredAccess Object Overview Optimizing Data Access Example ' ' Set up for efficient monitoring of I/O ' Private Sub One() Dim objDigInputs As FRCIOSignals ' Set up the controller to monitor all digital ' inputs once per second Set objDigInputs = mobjRobot.IOTypes _ .Item(frDInType).Signals objDigInputs.StartMonitor 1000 ' Flag the Digital Inputs as NoRefresh. ' We'll let the monitoring update their values objDigInputs.NoRefresh = True ' Reading a value for DI[10] that may be up to ' one second old is not sufficient. Flag that one ' to be updated when its value is read. objDigInputs(10).NoRefresh = False End Sub ' ' This routine is called sometime after One(). ' It demonstrates what happens on I/O reads ' Private Sub Two() Dim objDigInputs As FRCIOSignals Dim blnState As Boolean ' Recover the reference to DIn's Set objDigInputs = mobjRobot.IOTypes _ .Item(frDInType).Signals ' Reading DI[1] gets the value caught by the ' Monitor. It may be up to 1 second old. blnState = objDigInputs(1).Value ' The Robot Server accesses the robot when the ' following statement is executed so DI[10] is as ' is as current as possible. blnState = objDigInputs(10).Value End Sub FRCIOSignal.NoUpdate Property Description Returns/sets the flag that controls whether data is written directly to the robot or only to Robot Server memory when the Comment, Complementary, Polarity Simulate or Value property is written. Syntax objObjectIOSignal.NoUpdate[ = blnTorF] Parts objObjectIOSignal as FRCIOSignal blnTorF as Boolean Remarks Setting the NoUpdate property = TRUE on an I/O signal tells the Robot Server not to send data to the robot when any of the following properties are written: Comment Complementary Polarity Simulate Value All the information is saved in the Robot Server and written to the robot controller en masse when the FRCIOSignal.Update method is called. If, for example, you set NoUpdate = TRUE on the FRCIOSignal class object for DO[1], the associated physical robot output will not change no matter what you assign to its Value property until you invoke the Update method (see below). Your PC application will see the change immediately, but the robot will not. This serves an important role when you use the FRCScatteredAccess object. The current information for this signal is read from the robot at the time the NoUpdate property is set to TRUE. Setting the NoUpdate property = TRUE automatically implies the I/O signal is in a NoRefresh state, even if the NoRefresh property = FALSE. Your application could read and write the signal continuously without affecting the controller. This feature requires an R-J3 controller version of V5.22 or higher. See Also FRCIOSignal Object Overview FRCIOSignal.Update Method FRCIOSignal.NoRefresh Property FRCScatteredAccess Object Overview Optimizing Data Access Example ' ' Take control of DO[7] simulating it in the ' ON state Private Sub Sim7() Dim objDO7 As FRCIOSignal ' Stop sending changes on DO[7] to the robot Set objDO7 = mobjRobot.IOTypes(frDOutType) _ .Signals.Item(7) objDO7.NoUpdate = True ' Make DO[7] simulated and set it to ON. objDO7.Simulate = True objDO7.Value = True ' Make the changes effective on the robot. objDO7.Update End Sub FRCIOSignal Object Methods FRCIOSignal.StopMonitor Method Description Stops monitoring the I/O signal for changes. Syntax objIOSignal.StopMonitor Parts objIOSignal as FRCIOSignal Remarks This method turns off the IsMonitoring property and stops Change events from occurring. If more than one program has called the StartMonitor method, Change events will still occur until all programs call this method. This method is also called automatically if all programs destroy their reference to this object. This method is inherited by all of the specific I/O signal objects. See Also FRCIOSignal Object Overview FRCIOSignal_Change Event FRCIOSignal.IsMonitoring Property FRCIOSignal.StopMonitor Method FRCIOSignals.IsMonitoring Property FRCIOSignals.StartMonitor Method FRCIOSignals.StopMonitor Method Example ‘ This example starts and stops monitoring ‘ of the first signal in the ‘ collection of digital inputs Dim objIOSignals As FRCIOSignals Dim objIOSignal As FRCIOSignal Dim blnMonitoring As Boolean ‘ first get the collection Set objIOSignals = _ gobjRobot.IOTypes(frDInType).Signals ‘ get the first signal in the collection Set objIOSignal = objIOSignals(Index:=0) ‘ start monitoring with half-second latency objIOSignal.StartMonitor 500 ‘ value of IsMonitoring will be True blnMonitoring = objIOSignal.IsMonitoring ‘ turn monitoring off objIOSignal.StopMonitor ‘ value of IsMonitoring will be False blnMonitoring = objIOSignal.IsMonitoring FRCIOSignal Object Events FRCIOSignal_Change Event Description Occurs after the I/O signal has changed. Syntax mobjIOSignal_Change() Parts mobjIOSignal As FRCIOSignal Remarks This event is only generated if StartMonitor has been called on the FRCIOSignal object or on its FRCIOSignals object. This event is inherited by all of the specific I/O signal objects. See Also FRCIOSignal Object Overview FRCIOSignal.IsMonitoring Property FRCIOSignal.StartMonitor Method FRCIOSignal.StopMonitor Method FRCIOSignals.IsMonitoring Property FRCIOSignals.StartMonitor Method FRCIOSignals.StopMonitor Method Example ‘ This example monitors a signal and waits ‘ in a loop for a change Dim objIOSignals As FRCIOSignals Dim WithEvents mobjIOSignal As FRCIOSignal Dim mblnChanged As Boolean ‘ first get the collection Set objIOSignals = _ gobjRobot.IOTypes(frDInType).Signals ‘ get the first signal in the collection Set mobjIOSignal = objIOSignals(Index:=0) ‘ start monitoring with half-second latency objIOSignal.StartMonitor 500 ‘ initialize Change flag mblnChanged = False ‘ wait in a loop for a Change event Do While Not mblnChanged DoEvents Loop Private Sub mobjIOSignal_Change() mblnChanged = True End Sub FRCIOSignal_Delete Event Description Occurs before the I/O signal is deleted. Syntax mobjIOSignal_Delete() Parts mobjIOSignal As FRCIOSignal Remarks This event is automatically generated when a signal is removed from the collection. Signals can be removed when a configuration is deleted or changed. The signal is removed from the collection and the FRCIOSignal object is deleted after the event occurs. Any attempt to use this object after it is deleted will cause an "Object is no longer valid" run-time error. This event is inherited by all of the specific I/O signal objects. See Also FRCIOConfigs.Remove Method FRCIOSignal Object Overview Example ‘ This example sets a signal to Nothing ‘ when it is deleted and displays a warning Dim WithEvents mobjIOSignal As FRCIOSignal Private Sub mobjIOSignal_Delete() Set mobjIOSignal = Nothing MsgBox "IO Signal deleted" End Sub FRCFlagSignal Object Overview FRCFlagSignal Object Overview Description Represents a specific Flag signal. Overview Use this object to monitor and control a Flag signal. The Flag is a feature introduced with controller version V6.40. It does not control a physical connection but can be accessed much in the same way that an robot digital output can. As such, the FRCFlagSignal properties, methods and events are implemented and described as those of the FRCRobotIOSignal class. Since a Flag signal cannot be complemented or inverted, the Complementary and Polarity properties will throw an error if an assignment is made to them Properties Comment As String Complementary As Boolean IsAssigned As Boolean (read-only) IsMonitoring as Boolean (read only) IsOffline As Boolean (read-only) LogicalNum As Long (read-only) NoRefresh as Boolean NoUpdate as Boolean Parent As FRCIOSignals (read-only) Polarity As Boolean Robot As FRCRobot (read-only) Value As Boolean Methods Refresh() StartMonitor(Latency As Long) StopMonitor( ) Update() Events Change() Delete() Simulate() Unsimulate() FRCLaserAnalogIOSignal Object Overview FRCLaserAnalogIOSignal Object Properties FRCLaserAnalogIOSignal.Simulate Property Description Returns/sets the simulation status of a signal. Syntax [blnValue = ]objIOSignal.Simulate Parts blnValue As Boolean objIOSignal As FRCLaserAnalogIOSignal Remarks The Value of this property is TRUE when the signal is simulated and FALSE when it is unsimulated. When simulated, an input signal’s value can be changed directly and an output signal’s value is not actually sent. Changing this property generates either a Simulate or an Unsimulate event accordingly. See Also FRCIOSignal_Simulate Event FRCIOSignal_Unsimulate Event FRCLaserAnalogIOSignal Object Overview FRCLaserAnalogIOSignal.Value Property FRCLaserAnalogIOType.CanSimulate Property Example ‘ This example simulates a signal and ‘ changes the value Dim objIOSignals As FRCIOSignals Dim objIOSignal As FRCLaserAnalogIOSignal ‘ first get the LaserAnalog input collection Set objIOSignals = _ gobjRobot.IOTypes(frLAInType).Signals ‘ get the first signal in the collection Set objIOSignal = objIOSignals(Index:=0) ‘ make sure the signal is simulated objIOSignal.Simulate = True ‘ change the value objIOSignal.Value = 1 FRCLaserDigitalIOSignal Object Overview FRCLaserDigitalIOSignal Object Overview Description Represents a specific laser digital I/O signal. Overview Use this object to monitor and control a laser digital input or output signal. Properties Comment As String Complementary As Boolean IsAssigned As Boolean (read-only) IsMonitoring as Boolean (read only) IsOffline As Boolean (read-only) LogicalNum As Long (read-only) NoRefresh as Boolean NoUpdate as Boolean Parent As FRCIOSignals (read-only) Polarity As Boolean Robot As FRCRobot (read-only) Simulate As Boolean Value As Boolean Methods Refresh() StartMonitor(Latency As Long) StopMonitor( ) Update() Events Change() Delete() Simulate() Unsimulate() FRCPLCIOSignal Object Overview FRCPLCIOSignal Object Overview Description Represents a specific PLC I/O signal. Overview Use this object to monitor and control a PLC input or output signal. Properties Comment As String IsAssigned As Boolean (read-only) IsMonitoring as Boolean (read only) IsOffline As Boolean (read-only) LogicalNum As Long (read-only) NoRefresh as Boolean NoUpdate as Boolean Parent As FRCIOSignals (read-only) Robot As FRCRobot (read-only) Value As Boolean Methods Refresh() StartMonitor(Latency As Long) StopMonitor( ) Update() Events Change() Delete() Simulate() Unsimulate() FRCPLCIOSignal Object Properties FRCPLCIOSignal.Parent Property Description Returns the owning Signals collection Syntax objIOSignals = IOxxxSignal.Parent Parts objIOSignals As FRCIOSignals objIOSignal As FRCPLCIOSignal Remarks This property returns the FRCIOSignals collection object from which the signal originated. See Also FRCPLCIOSignal Object Overview FRCIOSignals Object Overview FRCIOSignals.Item Property Example ‘ This example gets a signal’s parent ‘ IOSignals object Dim objIOSignals1 As FRCIOSignals Dim objIOSignals2 As FRCIOSignals Dim objIOSignal As FRCPLCIOSignal ‘ get an PLC IO Signals collection Set objIOSignals1 = gobjRobot.IOTypes(frPLCInType) ‘ get a signal Set objIOSignal = objIOSignals1(Index:=0) ‘ objIOSignals1 and objIOSignals2 will ‘ refer to the same object Set objIOSignals2 = objIOSignal.Parent FRCPLCIOSignal.Value Property Description Returns/sets the value of a signal. Syntax [blnValue = ]objIOSignal.Value Parts blnValue As Boolean objIOSignal As FRCPLCIOSignal Remarks This property returns the current value of the signal. PLC inputs cannot be set with this property. See Also FRCIOSignal Object Overview FRCPLCIOSignal Object Overview FRCPLCIOType.IsBoolean Property Example ‘ This example changes a signal’s value Dim objIOSignals As FRCIOSignals Dim objIOSignal As FRCGroupIOSignal ‘ first get the PLC output collection Set objIOSignals = _ gobjRobot.IOTypes(frPLCOutType).Signals ‘ get the first signal in the collection Set objIOSignal = objIOSignals(Index:=0) ‘ change the value objIOSignal.Value = True FRCSOPIOSignal Object Overview FRCSOPIOSignal Object Overview Description Represents a specific Standard Operator Panel I/O signal. Overview Use this object to monitor and control a standard operator panel input or output signal. Properties Comment As String IsAssigned As Boolean (read-only) IsMonitoring as Boolean (read only) IsOffline As Boolean (read-only) LogicalNum As Long (read-only) NoRefresh as Boolean NoUpdate as Boolean Parent As FRCIOSignals (read-only) Robot As FRCRobot (read-only) Value As Boolean Methods Refresh() StartMonitor(Latency As Long) StopMonitor( ) Update() Events Change() Delete() Simulate() Unsimulate() FRCSOPIOSignal Object Properties FRCSOPIOSignal.Parent Property Description Returns the owning Signals collection Syntax objIOSignals = IOxxxSignal.Parent Parts objIOSignals As FRCIOSignals objIOSignal As FRCSOPIOSignal Remarks This property returns the FRCIOSignals collection object from which the signal originated. See Also FRCIOSignals Object Overview FRCIOSignals.Item Property FRCSOPIOSignal Object Overview Example ‘ This example gets a signal’s parent ‘ IOSignals object Dim objIOSignals1 As FRCIOSignals Dim objIOSignals2 As FRCIOSignals Dim objIOSignal As FRCSOPIOSignal ‘ get an SOP IO Signals collection Set objIOSignals1 = gobjRobot.IOTypes(frSOPInType) ‘ get a signal Set objIOSignal = objIOSignals1(Index:=0) ‘ objIOSignals1 and objIOSignals2 will ‘ refer to the same object Set objIOSignals2 = objIOSignal.Parent FRCSOPIOSignal.Value Property Description Returns/sets the value of a signal. Syntax [blnValue = ]objIOSignal.Value (for digital signal) Parts blnValue As Boolean objIOSignal As FRCSOPIOSignal Remarks This property returns the current value of the signal. SOP inputs cannot be set with this property. See Also FRCIOSignal Object Overview FRCSOPIOSignal Object Overview FRCSOPIOType.IsBoolean Property Example ‘ This example changes a signal’s value Dim objIOSignals As FRCIOSignals Dim objIOSignal As FRCGroupIOSignal ‘ first get the SOP output collection Set objIOSignals = _ gobjRobot.IOTypes(frSOPOutType).Signals ‘ get the first signal in the collection Set objIOSignal = objIOSignals(Index:=0) ‘ change the value objIOSignal.Value = True FRCTPIOSignal Object Overview FRCTPIOSignal Object Overview Description Represents a specific teach pendant I/O signal. Use this object to monitor and control a teach pendant input or output signal. TPOut signals can be used to determine the various general robot controller states. Starting with V5.20, the Robot Server automatically keeps these signals updated to reflect the current controller status. Use FRETPOutSignalConstants to access the correct TPOut signal. Properties Comment As String IsAssigned As Boolean (read-only) IsMonitoring as Boolean (read only) IsOffline As Boolean (read-only) LogicalNum As Long (read-only) NoRefresh as Boolean NoUpdate as Boolean Parent As FRCIOSignals (read-only) Value As Boolean Robot As FRCRobot (read-only) Methods Refresh() StartMonitor(Latency As Long) StopMonitor( ) Update() Events Change() Delete() Simulate() Unsimulate() FRCTPIOSignal Object Properties FRCTPIOSignal.Parent Property Description Returns the owning Signals collection Syntax objIOSignals = IOxxxSignal.Parent Parts objIOSignals As FRCIOSignals objIOSignal As FRCTPIOSignal Remarks This property returns the FRCIOSignals collection object from which the signal originated. See Also FRCIOSignals Object Overview FRCIOSignals.Item Property FRCTPIOSignal Object Overview Example ‘ This example gets a signal’s parent ‘ IOSignals object Dim objIOSignals1 As FRCIOSignals Dim objIOSignals2 As FRCIOSignals Dim objIOSignal As FRCTPIOSignal ‘ get an TP IO Signals collection Set objIOSignals1 = gobjRobot.IOTypes(frTPInType) ‘ get a signal Set objIOSignal = objIOSignals1(Index:=0) ‘ objIOSignals1 and objIOSignals2 will ‘ refer to the same object Set objIOSignals2 = objIOSignal.Parent FRCTPIOSignal.Value Property Description Returns/sets the value of a signal. Syntax [blnValue = ]objIOSignal.Value Parts blnValue As Boolean objIOSignal As FRCTPIOSignal Remarks This property returns the current value of the signal. Teach pendant inputs cannot be set with this property. See Also FRCIOSignal Object Overview FRCTPIOSignal Object Overview FRCTPIOType.IsBoolean Property Example ‘ This example changes a signal’s value Dim objIOSignals As FRCIOSignals Dim objIOSignal As FRCGroupIOSignal ‘ first get the TP output collection Set objIOSignals = _ gobjRobot.IOTypes(frTPOutType).Signals ‘ get the first signal in the collection Set objIOSignal = objIOSignals(Index:=0) ‘ change the value objIOSignal.Value = True FRCUOPIOSignal Object Overview FRCUOPIOSignal Object Overview Description Represents a specific User Operator Panel I/O signal. Overview Use this object to monitor and control a user operator panel input or output signal. Properties Comment As String IsAssigned As Boolean (read-only) IsMonitoring as Boolean (read only) IsOffline As Boolean (read-only) LogicalNum As Long (read-only) NoRefresh as Boolean NoUpdate as Boolean Parent As FRCIOSignals (read-only) Robot As FRCRobot (read-only) Value As Boolean Methods Refresh() StartMonitor(Latency As Long) StopMonitor( ) Update() Events Change() Delete() Simulate() Unsimulate() FRCUOPIOSignal Object Properties FRCUOPIOSignal.Parent Property Description Returns the owning Signals collection Syntax objIOSignals = IOxxxSignal.Parent Parts objIOSignals As FRCIOSignals objIOSignal As FRCUOPIOSignal Remarks This property returns the FRCIOSignals collection object from which the signal originated. Although this property is described here as a member of FRCUOPIOSignal, it applies to the following objects: FRCPLCIOSignal FRCSOPIOSignal FRCTPIOSignal See Also FRCIOSignals Object Overview FRCIOSignals.Item Property FRCIOUOPSignal Object Overview Example ‘ This example gets a signal’s parent ‘ IOSignals object Dim objIOSignals1 As FRCIOSignals Dim objIOSignals2 As FRCIOSignals Dim objIOSignal As FRCUOPIOSignal ‘ get an UOP IO Signals collection Set objIOSignals1 = gobjRobot.IOTypes(frUOPInType) ‘ get a signal Set objIOSignal = objIOSignals1(Index:=0) ‘ objIOSignals1 and objIOSignals2 will ‘ refer to the same object Set objIOSignals2 = objIOSignal.Parent FRCUOPIOSignal.Value Property Description Returns/sets the value of a signal. Syntax [blnValue = ]objIOSignal.Value Parts blnValue As Boolean objIOSignal As FRCUOPIOSignal Remarks This property returns the current value of the signal. UOP inputs cannot be changed with this property. Although this property is described here as a member of FRCUOPIOSignal, it applies to the following objects: FRCPLCIOSignal FRCSOPIOSignal FRCTPIOSignal See Also FRCIOSignal Object Overview FRCUOPIOSignal Object Overview FRCUOPIOType.IsBoolean Property Example ‘ This example changes a signal’s value Dim objIOSignals As FRCIOSignals Dim objIOSignal As FRCGroupIOSignal ‘ first get the UOP output collection Set objIOSignals = _ gobjRobot.IOTypes(frUOPOutType).Signals ‘ get the first signal in the collection Set objIOSignal = objIOSignals(Index:=0) ‘ change the value objIOSignal.Value = True FRCWeldDigitalIOSignal Object Overview FRCWeldDigitalIOSignal Object Overview Description Represents a specific weld digital I/O signal. Overview Use this object to monitor and control a weld digital input or output signal. Properties Comment As String Complementary As Boolean IsAssigned As Boolean (read-only) IsMonitoring as Boolean (read only) IsOffline As Boolean (read-only) LogicalNum As Long (read-only) NoRefresh as Boolean NoUpdate as Boolean Parent As FRCIOSignals (read-only) Polarity As Boolean Robot As FRCRobot (read-only) Simulate As Boolean Value As Boolean Methods Refresh() StartMonitor(Latency As Long) StopMonitor( ) Update() Events Change() Delete() Simulate() Unsimulate() FRCWeldDigitalIOSignal Object Properties FRCWeldDigitalIOSignal.Complementary Property Description Returns/sets the complementary status of an output signal. Syntax [blnValue = ]objIOSignal.Complementary Parts blnValue As Boolean objIOSignal As FRCWeldDigitalIOSignal Remarks This property can be used to determine if a signal is a member of a complementary pair. The complementary status can also be set. A value of TRUE means the signal is in a complementary pair. Signals with an odd logical number are complemented with the next higher signal, while signals with an even logical number are complemented with the next lower signal. See Also FRCIOSignal Object Overview FRCWeldDigitalIOSignal Object Overview FRCWeldDigitalIOSignal.Value Property FRCWeldDigitalIOType.CanComplement Property Example ‘ This example complements a signal ‘ and changes the value of both signals Dim objIOSignals As FRCIOSignals Dim objIOSignal As FRCWeldDigitalIOSignal ‘ first get the WeldDigital output collection Set objIOSignals = _ gobjRobot.IOTypes(frWDOutType).Signals ‘ get the signal, logical number is 1 Set objIOSignal = objIOSignals(1) ‘ complement the signal objIOSignal.Complementary = True ‘ change the value ‘ setting this signal high sets ‘ WeldDigital output signal 2’s value low objIOSignal.Value = True FRCWeldStickIOSignal Object Overview FRCWeldStickIOSignal Object Overview Description Represents a specific weld stick I/O signal. Overview Use this object to monitor and control a weld stick input or output signal. Properties Comment As String Complementary As Boolean IsAssigned As Boolean (read-only) IsMonitoring as Boolean (read only) IsOffline As Boolean (read-only) LogicalNum As Long (read-only) NoRefresh as Boolean NoUpdate as Boolean Parent As FRCIOSignals (read-only) Polarity As Boolean Robot As FRCRobot (read-only) Simulate As Boolean Value As Boolean Methods Refresh() StartMonitor(Latency As Long) StopMonitor( ) Update() Events Change() Delete() Simulate() Unsimulate() FRCIOSignals FRCIOSignals Object Properties FRCIOSignals.Count Property Description Returns the number of signals contained in the collection. Syntax [lngCount = ]objIOSignals.Count Parts lngCount As Long objIOSignals As FRCIOSignals Remarks The Count property can be used to loop through all the signals in the collection, however, it is generally better to enumerate the signals using the "for each" VB syntax. Count will be the number of signals with a valid configuration. The signals are not necessarily assigned yet since a cold start is required after configuration. If no valid configurations are available, then Count is 0 and the collection is empty. See Also FRCIOSignals Object Overview Example ’Example getting the number of signals contained in ’the digital output collection. Dim lngCount as Long Dim objIOSignals as FRCIOSignals ’Set the I/O signals object to digital outputs Set objIOSignals = _ mobjRobot.IOTypes.Item(frDOutType).Signals ’Get the number of digital outputs lngCount = objIOSignals.Count FRCIOSignals.IsMonitoring Property Description Returns information on whether monitoring is enabled. Syntax [blnIsMonitoring = ]objIOSignals.IsMonitoring Parts objIOSignals as FRCIOSignals blnIsMonitoring as Boolean Remarks This property is TRUE if monitoring of the signal collection is currently turned on; it is FALSE is monitoring is currently turned off. The StartMonitor and StopMonitor methods are used to control monitoring. See Also FRCIOSignals Object Overview FRCIOSignals.StartMonitor Method FRCIOSignals.StopMonitor Method Example ’Example determining if digital I/O signals are being ‘monitored Dim blnIsMonitoring as Boolean Dim objIOSignals as FRCIOSignals ’Set the I/O signals object to digital outputs Set objIOSignals = _ mobjRobot.IOTypes.Item(frDOutType).Signals ’Determine if monitoring blnIsMonitoring = objIOSignals.IsMonitoring FRCIOSignals Object Methods FRCIOSignals.Refresh Method Description Causes new data to be read from the robot into the local memory of I/O Signal data. Syntax objIOSignals.Refresh Parts objIOSignals as FRCIOSignals Remarks Used in conjunction with the NoRefresh property this method will force a "blockread" of the I/O signals collection when the signal data is next accessed. If the NoRefresh property is FALSE, then this method does nothing. See Also FRCIOSignals Object Overview Optimizing Data Access FRCIOSignal Object Overview FRCIOSignals.NoRefresh Property Example ’Example of refreshing the I/O signal data Dim objDInType As FRCDigitalIOType Set objDInType = gobjRobot.IOTypes(frDInType) objDInType.Signals.Refresh = True FRCIOSignals.StopMonitor Method Description Stops the monitoring of the I/O signals collection for changes. Syntax objIOSignals.StopMonitor Parts objIOSignals as FRCIOSignals Remarks This method turns off the IsMonitoring property and stops Change events from occurring. If more than one program has called the StartMonitor method, Change events will still occur until all programs call this method. This method is also called automatically if all programs destroy their reference to this object. See Also FRCIOSignals Object Overview FRCIOSignals.IsMonitoring Property FRCIOSignals.StartMonitor Method Example ’Example of stopping the monitoring of the I/O ’signals collection for changes Dim objIOSignals As FRCIOSignals ’Stop monitoring: objIOSignals.StopMonitor FRCxxxIOType FRCAnalogIOType Object Overview FRCAnalogIOType Object Overview Description This object is used to access both I/O signal and I/O configuration collections. Overview This represents the analog I/O type object. Properties CanComplement As Boolean (read-only) CanConfigure As Boolean (read-only) CanInvert As Boolean (read-only) CanSimulate As Boolean (read-only) Configs As FRCIOConfigs (read-only) IsBoolean As Boolean (read-only) IsInput As Boolean (read-only) Name As String (read-only) Parent As FRCIOTypes (read-only) Robot As FRCRobot (read-only) Signals As FRCIOSignals (read-only) Type As FREIOTypeConstants (read-only) Methods none Events none FRCAnalogIOType Object Properties FRCAnalogIOType.CanConfigure Property Description Returns information on whether I/O type can be configured. Syntax [blnValue = ]objIOType.CanConfigure Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that complementary paris are supported on this I/O type. See Also FRCAnalogIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be configured Dim blnValue as Boolean Dim objIOType as FRCAnalogIOType blnValue = objIOType.CanConfigure If blnValue = True Then MsgBox objIOType.Name & " can be configured." Else MsgBox objIOType.Name & " cannot be configured." End If FRCAnalogIOType.CanSimulate Property Description Returns information on whether this I/O type can be simulated. Syntax [blnValue = ]objIOType. CanSimulate Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be simulated. See Also FRCAnalogIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be simulated Dim blnValue as Boolean Dim objIOType as FRCAnalogIOType blnValue = objIOType.CanSimulate If blnValue = True Then MsgBox objIOType.Name & " can be simulated." Else MsgBox objIOType.Name & " cannot be simulated." End If FRCDigitalIOType Object Overview FRCDigitalIOType Object Properties FRCDigitalIOType.CanConfigure Property Description Returns information on whether this I/O type can be configured. Syntax [blnValue = ]objIOType.CanConfigure Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be configured. Although this property is described here as a member of FRCDigitalIOType, it applies to the following objects: FRCAnalogIOType FRCGroupIOType FRCLaserAnalogIOType FRCLaserDigitalIOType FRCPLCIOType FRCSOPIOType FRCTPIOType FRCUOPIOType FRCWeldDigitalIOType FRCWeldStickIOType See Also FRCDigitalIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be configured Dim blnValue as Boolean Dim objIOType as FRCDigitalIOType blnValue = objIOType.CanConfigure If blnValue = True Then MsgBox objIOType.Name & " can be configured." Else MsgBox objIOType.Name & " cannot be configured." End If FRCDigitalIOType.CanSimulate Property Description Returns information on whether this I/O type can be simulated. Syntax [blnValue = ]objIOType. CanSimulate Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be simulated. Although this property is described here as a member of FRCDigitalIOType, it applies to the following objects: FRCAnalogIOType FRCGroupIOType FRCLaserAnalogIOType FRCLaserDigitalIOType FRCPLCIOType FRCSOPIOType FRCTPIOType FRCUOPIOType FRCWeldDigitalIOType FRCWeldStickIOType See Also FRCDigitalIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be simulated Dim blnValue as Boolean Dim objIOType as FRCDigitalIOType blnValue = objIOType.CanSimulate If blnValue = True Then MsgBox objIOType.Name & " can be simulated." Else MsgBox objIOType.Name & " cannot be simulated." End If FRCFlagType Object Overview FRCFlagType Object Properties FRCFlagType.CanComplement Property Description Returns information on whether complementary pairs are supported on this I/O type. Syntax [blnValue = ]objIOType.CanComplement Parts blnValue As Boolean objIOType as FRCIOType Remarks A Flag cannot be complemented so this proerty always returns a value of FALSE. See Also FRCFlagType Object OverView FRCIOType Object Overview Example ‘Example of determining if complementary pairs are available Dim blnValue as Boolean Dim objIOType as FRCRobotIOType blnValue = objIOType.CanComplement If blnValue = True Then MsgBox objIOType.Name & " can be paired." Else MsgBox objIOType.Name & " cannot be paired." End If FRCFlagType.CanConfigure Property Description Returns information on whether this I/O type can be configured. Syntax [blnValue = ]objIOType.CanConfigure Parts blnValue As Boolean objIOType as FRCIOType Remarks The Flag type cannot be configured using the typical I/O configuration techniques. So this property always returns a value of FALSE. You can, however set $MIX_LOGIC.$NUM_FLG to adjust the number of Flags supported by the controller. The new setting takes affect after the next cold start. See Also FRCFlagType Object OverView FRCIOType Object Overview Example ‘Example of determining if the I/O type can be configured Dim blnValue as Boolean Dim objIOType as FRCRobotIOType blnValue = objIOType.CanConfigure If blnValue = True Then MsgBox objIOType.Name & " can be configured." Else MsgBox objIOType.Name & " cannot be configured." End If FRCFlagType.CanSimulate Property Description Returns information on whether this I/O type can be simulated. Syntax [blnValue = ]objIOType. CanSimulate Parts blnValue As Boolean objIOType as FRCIOType Remarks The Flag signal type does not support simulation so this property always returns s value of FALSE. See Also FRCFlagType Object OverView FRCIOType Object Overview Example ‘Example of determining if the I/O type can be simulated Dim blnValue as Boolean Dim objIOType as FRCRobotIOType blnValue = objIOType.CanSimulate If blnValue = True Then MsgBox objIOType.Name & " can be simulated." Else MsgBox objIOType.Name & " cannot be simulated." End If FRCGroupIOType Object Overview FRCGroupIOType Object Properties FRCGroupIOType.CanComplement Property Description Returns information on whether complementary pairs are supported on this I/O type. Syntax [blnValue = ]objIOType.CanComplement Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that complementary pairs are supported on this I/O type. See Also FRCGroupIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if complementary pairs are available Dim blnValue as Boolean Dim objIOType as FRCGroupIOType blnValue = objIOType.CanComplement If blnValue = True Then MsgBox objIOType.Name & " can be paired." Else MsgBox objIOType.Name & " cannot be paired." End If FRCGroupIOType.CanConfigure Property Description Returns information on whether this I/O type can be configured. Syntax [blnValue = ]objIOType.CanConfigure Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be configured. See Also FRCGroupIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be configured Dim blnValue as Boolean Dim objIOType as FRCGroupIOType blnValue = objIOType.CanConfigure If blnValue = True Then MsgBox objIOType.Name & " can be configured." Else MsgBox objIOType.Name & " cannot be configured." End If FRCGroupIOType.CanSimulate Property Description Returns information on whether this I/O type can be simulated. Syntax [blnValue = ]objIOType. CanSimulate Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be simulated. See Also FRCGroupIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be simulated Dim blnValue as Boolean Dim objIOType as FRCGroupIOType blnValue = objIOType.CanSimulate If blnValue = True Then MsgBox objIOType.Name & " can be simulated." Else MsgBox objIOType.Name & " cannot be simulated." End If FRCLaserAnalogIOType Object Overview FRCLaserAnalogIOType Object Overview Description This object is used to access both I/O signal and I/O configuration collections. Overview This represents the laser analog I/O type object. Properties CanComplement As Boolean (read-only) CanConfigure As Boolean (read-only) CanInvert As Boolean (read-only) CanSimulate As Boolean (read-only) Configs As FRCIOConfigs (read-only) IsBoolean As Boolean (read-only) IsInput As Boolean (read-only) Name As String (read-only) Parent As FRCIOTypes (read-only) Robot As FRCRobot (read-only) Signals As FRCIOSignals (read-only) Type As FREIOTypeConstants (read-only) Methods none Events none FRCLaserAnalogIOType Object Properties FRCLaserAnalogIOType.CanConfigure Property Description Returns information on whether this I/O type can be configured. Syntax [blnValue = ]objIOType.CanConfigure Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be configured. See Also FRCLaserAnalogIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be configured Dim blnValue as Boolean Dim objIOType as FRCLaserAnalogIOType blnValue = objIOType.CanConfigure If blnValue = True Then MsgBox objIOType.Name & " can be configured." Else MsgBox objIOType.Name & " cannot be configured." End If FRCLaserAnalogIOType.CanSimulate Property Description Returns information on whether this I/O type can be simulated. Syntax [blnValue = ]objIOType. CanSimulate Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be simulated. See Also FRCLaserAnalogIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be simulated Dim blnValue as Boolean Dim objIOType as FRCLaserAnalogIOType blnValue = objIOType.CanSimulate If blnValue = True Then MsgBox objIOType.Name & " can be simulated." Else MsgBox objIOType.Name & " cannot be simulated." End If FRCLaserDigitalIOType Object Overview FRCLaserDigitalIOType Object Properties FRCLaserDigitalIOType.CanComplement Property Description Returns information on whether complementary pairs are supported on this I/O type. Syntax [blnValue = ]objIOType.CanComplement Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that complementary pairs are supported on this I/O type. See Also FRCLaserDigitalIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if complementary pairs are available Dim blnValue as Boolean Dim objIOType as FRCLaserDigitalIOType blnValue = objIOType.CanComplement If blnValue = True Then MsgBox objIOType.Name & " can be paired." Else MsgBox objIOType.Name & " cannot be paired." End If FRCLaserDigitalIOType.CanConfigure Property Description Returns information on whether this I/O type can be configured. Syntax [blnValue = ]objIOType.CanConfigure Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be configured. See Also FRCLaserDigitalIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be configured Dim blnValue as Boolean Dim objIOType as FRCLaserDigitalIOType blnValue = objIOType.CanConfigure If blnValue = True Then MsgBox objIOType.Name & " can be configured." Else MsgBox objIOType.Name & " cannot be configured." End If FRCLaserDigitalIOType.CanSimulate Property Description Returns information on whether this I/O type can be simulated. Syntax [blnValue = ]objIOType. CanSimulate Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be simulated. See Also FRCLaserDigitalIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be simulated Dim blnValue as Boolean Dim objIOType as FRCLaserDigitalIOType blnValue = objIOType.CanSimulate If blnValue = True Then MsgBox objIOType.Name & " can be simulated." Else MsgBox objIOType.Name & " cannot be simulated." End If FRCMarkerType Object Overview FRCMarkerType Object Properties FRCMarkerType.CanConfigure Property Description Returns information on whether this I/O type can be configured. Syntax [blnValue = ]objIOType.CanConfigure Parts blnValue As Boolean objIOType as FRCIOType Remarks The Marker type cannot be configured using the typical I/O configuration techniques. So this property always returns a value of FALSE. You can, however set $MIX_LOGIC.$NUM_MKR to adjust the number of Markers supported by the controller. The new setting takes affect after the next cold start. See Also FRCMarkerType Object OverView FRCIOType Object Overview Example ‘Example of determining if the I/O type can be configured Dim blnValue as Boolean Dim objIOType as FRCRobotIOType blnValue = objIOType.CanConfigure If blnValue = True Then MsgBox objIOType.Name & " can be configured." Else MsgBox objIOType.Name & " cannot be configured." End If FRCMarkerType.CanSimulate Property Description Returns information on whether this I/O type can be simulated. Syntax [blnValue = ]objIOType. CanSimulate Parts blnValue As Boolean objIOType as FRCIOType Remarks The Marker signal type does not support simulation so this property always returns s value of FALSE. See Also FRCMarkerType Object OverView FRCIOType Object Overview Example ‘Example of determining if the I/O type can be simulated Dim blnValue as Boolean Dim objIOType as FRCRobotIOType blnValue = objIOType.CanSimulate If blnValue = True Then MsgBox objIOType.Name & " can be simulated." Else MsgBox objIOType.Name & " cannot be simulated." End If FRCPLCIOType Object Overview FRCPLCIOType Object Properties FRCPLCIOType.CanComplement Property Description Returns information on whether complementary pairs are supported on this I/O type. Syntax [blnValue = ]objIOType.CanComplement Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that complementary pairs are supported on this I/O type. See Also FRCPLCIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if complementary pairs are available Dim blnValue as Boolean Dim objIOType as FRCPLCIOType blnValue = objIOType.CanComplement If blnValue = True Then MsgBox objIOType.Name & " can be paired." Else MsgBox objIOType.Name & " cannot be paired." End If FRCRobotIOType Object Overview FRCRobotIOType Object Overview Description This object is used to access I/O signals of non configurable robot I/O types. Overview This represents the robot I/O type object. Properties CanComplement As Boolean (read-only) CanConfigure As Boolean (read-only) CanInvert As Boolean (read-only) CanSimulate As Boolean (read-only) IsBoolean As Boolean (read-only) IsInput As Boolean (read-only) Name As String (read-only) Parent As FRCIOTypes (read-only) Robot As FRCRobot (read-only) Signals As FRCIOSignals (read-only) Type As FREIOTypeConstants (read-only) Methods none Events none FRCRobotIOType Object Properties FRCRobotIOType.CanComplement Property Description Returns information on whether complementary pairs are supported on this I/O type. Syntax [blnValue = ]objIOType.CanComplement Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that complementary pairs are supported on this I/O type. See Also FRCRobotIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if complementary pairs are available Dim blnValue as Boolean Dim objIOType as FRCRobotIOType blnValue = objIOType.CanComplement If blnValue = True Then MsgBox objIOType.Name & " can be paired." Else MsgBox objIOType.Name & " cannot be paired." End If FRCRobotIOType.CanConfigure Property Description Returns information on whether this I/O type can be configured. Syntax [blnValue = ]objIOType.CanConfigure Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be configured. See Also FRCRobotIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be configured Dim blnValue as Boolean Dim objIOType as FRCRobotIOType blnValue = objIOType.CanConfigure If blnValue = True Then MsgBox objIOType.Name & " can be configured." Else MsgBox objIOType.Name & " cannot be configured." End If FRCRobotIOType.CanSimulate Property Description Returns information on whether this I/O type can be simulated. Syntax [blnValue = ]objIOType. CanSimulate Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be simulated. See Also FRCRobotIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be simulated Dim blnValue as Boolean Dim objIOType as FRCRobotIOType blnValue = objIOType.CanSimulate If blnValue = True Then MsgBox objIOType.Name & " can be simulated." Else MsgBox objIOType.Name & " cannot be simulated." End If FRCSOPIOType Object Overview FRCSOPIOType Object Properties FRCSOPIOType.CanComplement Property Description Returns information on whether complementary pairs are supported on this I/O type. Syntax [blnValue = ]objIOType.CanComplement Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that complementary pairs are supported on this I/O type. See Also FRCSOPIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if complementary pairs are available Dim blnValue as Boolean Dim objIOType as FRCSOPIOType blnValue = objIOType.CanComplement If blnValue = True Then MsgBox objIOType.Name & " can be paired." Else MsgBox objIOType.Name & " cannot be paired." End If FRCSOPIOType.CanConfigure Property Description Returns information on whether this I/O type can be configured. Syntax [blnValue = ]objIOType.CanConfigure Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be configured. See Also FRCSOPIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be configured Dim blnValue as Boolean Dim objIOType as FRCSOPIOType blnValue = objIOType.CanConfigure If blnValue = True Then MsgBox objIOType.Name & " can be configured." Else MsgBox objIOType.Name & " cannot be configured." End If FRCSOPIOType.CanSimulate Property Description Returns information on whether this I/O type can be simulated. Syntax [blnValue = ]objIOType. CanSimulate Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be simulated. See Also FRCSOPIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be simulated Dim blnValue as Boolean Dim objIOType as FRCSOPIOType blnValue = objIOType.CanSimulate If blnValue = True Then MsgBox objIOType.Name & " can be simulated." Else MsgBox objIOType.Name & " cannot be simulated." End If FRCTPIOType Object Overview FRCTPIOType Object Properties FRCTPIOType.CanComplement Property Description Returns information on whether complementary pairs are supported on this I/O type. Syntax [blnValue = ]objIOType.CanComplement Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that complementary pairs are supported on this I/O type. See Also FRCTPIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if complementary pairs are available Dim blnValue as Boolean Dim objIOType as FRCTPIOType blnValue = objIOType.CanComplement If blnValue = True Then MsgBox objIOType.Name & " can be paired." Else MsgBox objIOType.Name & " cannot be paired." End If FRCTPIOType.CanConfigure Property Description Returns information on whether this I/O type can be configured. Syntax [blnValue = ]objIOType.CanConfigure Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be configured. See Also FRCTPIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be configured Dim blnValue as Boolean Dim objIOType as FRCTPIOType blnValue = objIOType.CanConfigure If blnValue = True Then MsgBox objIOType.Name & " can be configured." Else MsgBox objIOType.Name & " cannot be configured." End If FRCTPIOType.CanSimulate Property Description Returns information on whether this I/O type can be simulated. Syntax [blnValue = ]objIOType. CanSimulate Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be simulated. See Also FRCTPIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be simulated Dim blnValue as Boolean Dim objIOType as FRCTPIOType blnValue = objIOType.CanSimulate If blnValue = True Then MsgBox objIOType.Name & " can be simulated." Else MsgBox objIOType.Name & " cannot be simulated." End If FRCUOPIOType Object Overview FRCUOPIOType Object Properties FRCUOPIOType.CanComplement Property Description Returns information on whether complementary pairs are supported on this I/O type. Syntax [blnValue = ]objIOType.CanComplement Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that complementary pairs are supported on this I/O type. See Also FRCUOPIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if complementary pairs are available Dim blnValue as Boolean Dim objIOType as FRCUOPIOType blnValue = objIOType.CanComplement If blnValue = True Then MsgBox objIOType.Name & " can be paired." Else MsgBox objIOType.Name & " cannot be paired." End If FRCUOPIOType.CanConfigure Property Description Returns information on whether this I/O type can be configured. Syntax [blnValue = ]objIOType.CanConfigure Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be configured. See Also FRCUOPIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be configured Dim blnValue as Boolean Dim objIOType as FRCUOPIOType blnValue = objIOType.CanConfigure If blnValue = True Then MsgBox objIOType.Name & " can be configured." Else MsgBox objIOType.Name & " cannot be configured." End If FRCUOPIOType.CanSimulate Property Description Returns information on whether this I/O type can be simulated. Syntax [blnValue = ]objIOType. CanSimulate Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be simulated. See Also FRCUOPIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be simulated Dim blnValue as Boolean Dim objIOType as FRCUOPIOType blnValue = objIOType.CanSimulate If blnValue = True Then MsgBox objIOType.Name & " can be simulated." Else MsgBox objIOType.Name & " cannot be simulated." End If FRCWeldStickIOType Object Overview FRCWeldStickIOType Object Overview Description This object is used to access both I/O signal and I/O configuration collections. Overview This represents the Weld Stick I/O type object. Properties CanComplement As Boolean (read-only) CanConfigure As Boolean (read-only) CanInvert As Boolean (read-only) CanSimulate As Boolean (read-only) Configs As FRCIOConfigs (read-only) IsBoolean As Boolean (read-only) IsInput As Boolean (read-only) Name As String (read-only) Parent As FRCIOTypes (read-only) Robot As FRCRobot (read-only) Signals As FRCIOSignals (read-only) Type As FREIOTypeConstants (read-only) Methods none Events none FRCWeldStickIOType Object Properties FRCWeldStickIOType.CanComplement Property Description Returns information on whether complementary pairs are supported on this I/O type. Syntax [blnValue = ]objIOType.CanComplement Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that complementary pairs are supported on this I/O type. See Also FRCWeldStickIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if complementary pairs are available Dim blnValue as Boolean Dim objIOType as FRCWeldStickIOType blnValue = objIOType.CanComplement If blnValue = True Then MsgBox objIOType.Name & " can be paired." Else MsgBox objIOType.Name & " cannot be paired." End If FRCWeldStickIOType.CanConfigure Property Description Returns information on whether this I/O type can be configured. Syntax [blnValue = ]objIOType.CanConfigure Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be configured. See Also FRCWeldStickIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be configured Dim blnValue as Boolean Dim objIOType as FRCWeldStickIOType blnValue = objIOType.CanConfigure If blnValue = True Then MsgBox objIOType.Name & " can be configured." Else MsgBox objIOType.Name & " cannot be configured." End If FRCWeldStickIOType.CanSimulate Property Description Returns information on whether this I/O type can be simulated. Syntax [blnValue = ]objIOType. CanSimulate Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be simulated. See Also FRCWeldStickIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be simulated Dim blnValue as Boolean Dim objIOType as FRCWeldStickIOType blnValue = objIOType.CanSimulate If blnValue = True Then MsgBox objIOType.Name & " can be simulated." Else MsgBox objIOType.Name & " cannot be simulated." End If FRCWeldDigitalIOType Object Overview FRCWeldDigitalIOType Object Overview Description This object is used to access both I/O signal and I/O configuration collections. Overview This represents the Weld Digital I/O type object. Properties CanComplement As Boolean (read-only) CanConfigure As Boolean (read-only) CanInvert As Boolean (read-only) CanSimulate As Boolean (read-only) Configs As FRCIOConfigs (read-only) IsBoolean As Boolean (read-only) IsInput As Boolean (read-only) Name As String (read-only) Parent As FRCIOTypes (read-only) Robot As FRCRobot (read-only) Signals As FRCIOSignals (read-only) Type As FREIOTypeConstants (read-only) Methods none Events none FRCWeldDigitalIOType Object Properties FRCWeldDigitalIOType.CanComplement Property Description Returns information on whether complementary pairs are supported on this I/O type. Syntax [blnValue = ]objIOType.CanComplement Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that complementary pairs are supported on this I/O type. See Also FRCWeldDigitalIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if complementary pairs are available Dim blnValue as Boolean Dim objIOType as FRCWeldDigitalIOType blnValue = objIOType.CanComplement If blnValue = True Then MsgBox objIOType.Name & " can be paired." Else MsgBox objIOType.Name & " cannot be paired." End If FRCWeldDigitalIOType.CanConfigure Property Description Returns information on whether this I/O type can be configured. Syntax [blnValue = ]objIOType.CanConfigure Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be configured. See Also FRCWeldDigitalIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be configured Dim blnValue as Boolean Dim objIOType as FRCWeldDigitalIOType blnValue = objIOType.CanConfigure If blnValue = True Then MsgBox objIOType.Name & " can be configured." Else MsgBox objIOType.Name & " cannot be configured." End If FRCWeldDigitalIOType.CanSimulate Property Description Returns information on whether this I/O type can be simulated. Syntax [blnValue = ]objIOType. CanSimulate Parts blnValue As Boolean objIOType as FRCIOType Remarks A value of TRUE indicates that this I/O type can be simulated. See Also FRCWeldDigitalIOType Object Overview FRCIOType Object Overview Example ‘Example of determining if the I/O type can be simulated Dim blnValue as Boolean Dim objIOType as FRCWeldDigitalIOType blnValue = objIOType.CanSimulate If blnValue = True Then MsgBox objIOType.Name & " can be simulated." Else MsgBox objIOType.Name & " cannot be simulated." End If FRCIOTypes FRCIOTypes Object Properties FRCIOTypes.Count Property Description Returns the number of I/O types set up on the controller. Syntax [intCount = ]objIOTypes.Count Parts intCount As Integer objIOTypes As FRCIOTypes Remarks The Count property can be used to loop through all the I/O types in the collection, however, it is generally better to retrieve the objects in the collection through the "Item" property or by using a For…Each loop. See Also FRCIOTypes Object Overview Example ‘Example getting the number of I/O types that are set ‘up on the controller Dim intCount as Integer Dim objIOTypes as FRCIOTypes Set objIOTypes = mobjRobot.IOTypes intCount = objIOTypes.Count FREIOTypeConstants FREIOTypeConstants Overview Description An enumeration of constants used to identify the different types of I/O. Overview These constants are used with the I/O objects when referring to a specific type. Please refer to the application-specific Setup and Operations Manual for information on setting up and using I/O. Values frAInType frAOutType frDInType frDOutType frFlagType frGPInType frGPOutType frLAInType frLAOutType frLDOutType frLDInType frMarkerType frMaxIOType frPLCInType frPLCOutType frRDInType frRDOutType frSOPInType frSOPOutType frTPInType frTPOutType frUOPInType frUOPOutType frWDInType frWDOutType frWSTKInType frWSTKOutType See Also FRCIOConfig.PhysicalType Property FRCIOType.Type Property FRCIOTypes.Item Property frDInType Description Digital Input Remarks none See Also FREIOTypeConstants Overview frLAInType Description Laser Analog Input Remarks none See Also FREIOTypeConstants Overview frLDInType Description Laser Digital Input Remarks none See Also FREIOTypeConstants Overview frMaxIOType Description Maximum system defined I/O type Remarks none See Also FREIOTypeConstants Overview frPLCInType Description PLC Input Remarks none See Also FREIOTypeConstants Overview frRDOutType Description Robot Digital Output Remarks none See Also FREIOTypeConstants Overview frSOPInType Description System Operator Panel Input Remarks none See Also FREIOTypeConstants Overview frTPOutType Description Teach Pendant Digital Output Remarks none See Also FREIOTypeConstants Overview frUOPInType Description User Operator Panel Input Remarks none See Also FREIOTypeConstants Overview frWDOutType Description Weld Digital Output Remarks none See Also FREIOTypeConstants Overview FRETPOutSignalConstants frTPOutHold Description The signal that indicates motion has been held. Remarks Use this constant when checking if the robot motion has been held See Also FRETPoutSignalConstants Overview Packet Events FREPacketEventConstants frSSC_Wild Description Wild card for SubSystemCode trigger Remarks Use this constant in the FRCRobot.CreatePacketEvent Method call to receive Packets generated by any subsystem. NOTE: This will greatly increase the number of packets you will receive and have to process. Doing this might present a significant adverse impact on performance of your PC application. Using the frSSC_KAREL constant is recommended. See Also FREPacketEventConstants Overview FRCRobot.CreatePacketEvent Method FREPacketEventConstants Overview FREPacketEventConstants.frSSC_KAREL Pipes FRCPipes FRCPipes Object Properties FRCPipes.Count Property Description Returns the number of items within this collection object. Syntax [intNumFields = ]objPipes.Count Parts objPipes as FRCPipes intNumPipes as Integer Remarks This property returns the number of pipes on the controller. See Also FRCPipes Object Overview Example ‘ Find out how many pipes are available on the controller Dim objPipes as FRCPipes Dim intNumPipes as Integer intNumPipes = objPipes.Count FRCPipes.Item Property Description Returns a pipe object from the collection. Syntax [objPipe = ]objPipes.Item(enuPipeID) or [objPipe = ]objPipes(Index:=intIndex) Parts objPipes as FRCPipes objPipe as FRCPipe enuPipeID as FREPipeIDConstants intIndex as Integer Remarks The pipe can be specified by ID or index. It is possible to use the "for each" VB syntax to enumerate all pipes in the collection. This property will return an FRCPipe object. The returned object can then be used to receive new data blocks from the pipe. See Also FRCPipes Object Overview FREPipeIDConstants Overview Example ‘ Get a pipe from the collection Dim objPipes as FRCPipes ‘ Assume passed in Dim objPipe as FRCPipe ‘ Get a Pipe Set objPipe = objPipes.Item(frPipeKAREL1ID) FRCPipes Object Events FRCPipes_Register Event Description Occurs when a new pipe is registered on the controller. Syntax Private Sub mobjPipes_Register( ByVal Pipe as FRCPipe ) End Sub Parts mobjPipes as FRCPipes Pipe as FRCPipe Remarks The FRCPipes object contains a collection of all pipes that exist when the object is first created. As new pipes are created on the controller, the collection is updated and this event raised. KAREL programs register a pipe using the Error! Hyperlink reference not valid. built-in. See Also FRCPipes Object Overview Example ‘ Detect when a pipe is added. Private WithEvents mobjPipes as FRCPipes Private Sub mobjPipes_Register( ByVal Pipe as FRCPipe ) ‘ Start monitoring End Sub FRCPipe FRCPipe Object Methods FRCPipe.StopMonitor Method Description Stops monitoring data put into the pipe. Syntax objPipe.StopMonitor Parts mobjPipe as FRCPipe Remarks The Robot Server stops receiving data from a pipe when this method is called. When monitoring is not active, FRCPipe.IsMonitoring will return the value FALSE. A controller task can also stop the pipe by using the Error! Hyperlink reference not valid. KAREL built-in. Your application can detect this by checking the status flag for the Error! Hyperlink reference not valid. being reset in the FRCPipe_Receive event. StopMonitor acts like a reference counted action. That is: two StartMonitor calls require two StopMonitor calls. The pipe will be flushed automatically when the "last" StopMonitor is called. Call FRCPipe.Flush if you want to guarantee that the pipe gets flushed even if it is being kept active by another application. See Also FRCPipe Object Overview FRCPipe.IsMonitoring Property FRCPipeStartMonitor Method FRCPipe_Receive Event FRCPipe.Flush Method Example ‘ Stop receiving data from the pipe Private WithEvents mobjPipe as FRCPipe Const frPipeKAREL1ID = 5 Set mobjPipe = gobjRobot.Pipes(frPipeKAREL1ID) mojPipe.StopMonitor FRCPipeFields FRCPipeFields Object Properties FRCPipeFields.Count Property Description Returns the number of fields within this collection object. Syntax [intNumFields = ]objPipeFields.Count Parts objPipeFields as FRCPipeFields intNumFields as Integer Remarks This property returns the number of fields in a data block from a pipe. See Also FRCPipeFields Object Overview Example ` Find out how many elements are in the structure ` or array object that was passed in. ` Dim objStructOrArray as FRCPipeFields Dim intNumFields as Integer intNumFields = objStructArray.Count FRCPipeFields.FullName Property Description Returns the full name of the field object. Syntax [strName = ]objPipeFields.VarName Parts objPipeFields as FRCPipeFields strName as String Remarks This is the string that shows the sequence of field names that were encountered to arrive at this object. For example, pipe data defined by the structure of the variable ASTRUCTSTRUCT. It is defined in KAREL by the following code segment. TYPE strct_t = STRUCTURE ai: ARRAY[2] OF INTEGER ENDSTRUCTURE strctstrct_t = STRUCTURE as1: ARRAY[2] OF strct_t as2: ARRAY[2] OF strct_t ENDSTRUCTURE VAR astrctstrct: ARRAY[2] OF strctstrct_t A tree view of the data would look like this. FRCPipeFields.FullName for the element AI shown highlighted above would be "[1].AS1[1].AI". Note that there is no fieldname at the top level. For variable data, the top field name is the name of the variable itself. Pipe data are not variables. They are data presented and accessed using techniques similar to variables. See Also FRCPipeFields Object Overview FRCPipeFields.FieldName Property Example ’ Display the name of this structure in the text box ’ Dim objStruct as FRCPipeFields ‘ Assume passed in Dim strStructName as String strStructName = objStruct.FullName FRCPipeField FRCPipeField Object Overview Description Provides access to data values received from a pipe. Overview Use the FRCPipeField object to access the values of the data received from the pipe. FRCPipeField is an object representation of the simplest fields from a data block received from a pipe. The types supported by this object include: BOOLEAN BYTE INTEGER REAL SHORT STRING XYZWPR XYZWPREXT POSITION JOINTPOS Other types (arrays and structures) are represented as FRCPipeFields objects. This object provides access to the attributes and value of a single field. Properties FieldName as String (read-only) IsInitialized as Boolean (read-only) Parent as {FRCPipeFields | FRCPipe} (read-only) Pipe as FRCPipe (read-only) Robot as FRCRobot (read-only) TypeCode as FRETypeCodeConstants (read-only) TypeName as String (read-only) Value as Variant (read-only) FullName as String (read-only) Methods none Events none See Also FRCPipeFields Object Overview FRCPipes Object Overview FRCPipePosition Object Overview FRCPipeField Object Properties FRCPipeField.FieldName Property Description Returns only the name of this particular field object. Syntax [strName = ]objPipeField.FieldName Parts objPipeField as FRCPipeField strName as String Remarks This is the name of the field at its simplest type. It may be a top level field name, an element number in an array, or a field name within a structure. This does not include the array name or structure name of any container. For example, the field name "MY_STRUCT_T.FIELD1" would simply return "FIELD1". See Also FRCPipeField Object Overview FRCPipeField.FullName Property Example ‘ Display the field name in a text box Dim objPipeField as FRCPipeField ‘ Assume passed in txtFieldName = objPipeField.FieldName FRCPipeField.FullName Property Description Returns the full name of the field object. Syntax [strName = ] objPipeField.VarName Parts objPipeField as FRCPipeField strName as String Remarks The FullName is the full field name used to get to the FRCPipeField object from the top level. For example, pipe data defined by the structure of the variable ASTRCTSTRCT. It is defined in KAREL by the following code segment. TYPE strct_t = STRUCTURE ai: ARRAY[2] OF INTEGER ENDSTRUCTURE strctstrct_t = STRUCTURE as1: ARRAY[2] OF strct_t as2: ARRAY[2] OF strct_t ENDSTRUCTURE VAR astrctstrct: ARRAY[2] OF strctstrct_t A tree view of the data would look like this. FRCPipeField.FullName for the element 1 shown highlighted above would be "[1].AS1[1].AI[1]". Note that there is no fieldname at the top level. For variable data, the top field name is the name of the variable itself. Pipe data are not variables. They are data presented and accessed using techniques similar to variables. See Also FRCPipeField Object Overview FRCPipeField.FieldName Property Example ’ Display the name of this field in the text box ‘ Dim objPipeField as FRCPipeField ‘ assume passed in txtName = objPipeField.FullName FREPipeStateConstants FREPipeStateConstants Overview Description An enumeration of constants that identify states of a pipe. Overview The FRCPipe_Receive event provides the current state of the pipe each time it is raised. Use these constants to decode this state. These state constants act as bit flags that can be combined. For example, a pipe can be both active and flushed at the same time. Values Error! Hyperlink reference not valid. Error! Hyperlink reference not valid. Error! Hyperlink reference not valid. See Also Error! Hyperlink reference not valid. Scattered Access FRCScatteredAccess Object Overview Description Enables you to access a group of independent variables and I/O signals with minimum network overhead. Overview The NoRefresh and NoUpdate features of the Robot Server take advantage of the fact that structures and arrays are stored in contiguous memory. If the robot programs are designed properly, these features can be used effectively to create an efficient, high speed PC application. In many cases, you do not have this luxury. The robot program might be developed long before a companion PC application is considered. It is also very likely that the PC application must access system information (Sysvars, I/O, Registers) along with variables from multiple programs in a coordinated manor. ScatteredAccess is a way to read and write multiple independent robot variables, I/O signals, positions and numeric registers with one network access. This has the potential to increase Robot Server performance by reducing network communication overhead. To accomplish this you must first use FRCRobot.CreateScatteredAccess to create an FRCScatteredAccess class object then call the Refresh and Update methods of that object to read and write the data. This process is described more completely in the Scattered Access section of the Optimizing Data Access help. Properties none Methods Refresh() Update() Events none See Also FRCRobot.CreateScatteredAccess Method FRCIOSignal.NoReFresh Property FRCIOSignal.NoUpdate Property FRCVar.NoRefresh Property FRCVar.NoUpdate Property FRCScatteredAccess Methods FRCScatteredAccess Refresh Method Description Reads the values of all items controlled by this object from the robot into local Robot Server memory on the PC. Syntax objScatt.Refresh Parts objScatt as FRCScatteredAccess Remarks Reading items in a Scatter Access list is a two step process. The FRCScatteredAccess.Refresh method makes one network access to get all the identified data from the robot. You then use the Value properties of each individual object to access them. This is better than doing a Refresh on each of the items individually because only one network access is required for this refresh. Either the NoUpdate or NoRefresh property of each item must be True for this to be effective. Otherwise, the Robot Server will access the robot again when you read the Value property of the individual item. Note that the FRCRegNumeric class does not support the NoRefresh property so you must set these on the FRCVar parent. See Also FRCScatteredAccess Object Overview FRCRobot.CreateScatteredAccess Method FRCIOSignal.NoReFresh Property FRCIOSignal.NoUpdate Property FRCVar.NoRefresh Property FRCVar.NoUpdate Property Example For the following example, assume mobjSA1 was created as described in the example for the FRCRobot.CreateScatteredAccess Property . ' ' Update the display ' Private Sub UpdateDisplay() Dim objCount As FRCVar Dim objDO100 As FRCDigitalIOSignal Dim objR50 As FRCRegNumeric Dim objPR60 As FRCSysPosition ' Access the robot to get fresh data. mobjSA1.Refresh ' Get references to the data to access. It would be ' much more efficient to keep these references as ' module level variables. ' However, this demonstrates minimum scope ' requirements. Set objCount = mobjRobot.Programs("MYPROG") _ .Variables("Count") Set objDO100 = mobjRobot.IOTypes(frDOutType) _ .Signals(100) Set objR50 = mobjRobot.RegNumerics(50).Value Set objPR60 = mobjRobot.RegPositions(60) ' Update the text boxes to display the information. ' This will not require a robot access. Text1.Text = objCount.Value If objDO100.Value Then Text2.Text = "ON" Else Text2.Text = "OFF" End If If objR50.Type = frIntegerType Then Text3.Text = objR50.RegLong Else Text3.Text = objR50.RegFloat End If Text4.Text = objPR60.Group(1).Formats(frXyzWpr).X End Sub FRCScatteredAccess Update Method Description Writes the values of all items controlled by this object from local Robot Server memory on the PC to the robot. Syntax objScatt.Update Parts objScatt as FRCScatteredAccess Remarks Writing items in a Scatter Access list is a two step process. You use the Value properties of each individual object to set them. Then invoke the FRCScatteredAccess.Update method to make one network access to send all the identified data to the robot. This is better than doing an Update on each of the items individually because only one network access is required for this refresh. Also, the values are set almost simultaneously, which can address many of the interaction and timing issues. The NoUpdate property of each item must be True for this to be effective. Otherwise, the Robot Server will not send the data to the robot. Note that the FRCRegNumeric class does not support the NoUpdate property so you must set this on the FRCVar parent. See Also FRCScatteredAccess Object Overview FRCRobot.CreateScatteredAccess Method FRCIOSignal.NoUpdate Property FRCVar.NoUpdate Property FRCVars.NoUpdate Property Example For the following example, assume mobjSA1 was created as described in the example for the FRCRobot.CreateScatteredAccess Property . Assume module level variables have been declared and initialized for the individual items covered by mobjSA1. ' ' Update the data in one quick shot ' Private Sub SendIt() ' Pull the information off the form mobjCount.Value = Text1.Text If Check1.Value = 1 Then mobjDO100.Value = True Else mobjDO100.Value = False End If mobjReg50.RegLong = CSng(Text3.Text) objPR60.Group(1) _ .Formats(frXyzWpr).X = CSng(Text4.Text) ' Send it all to the robot in one call mobjSA1.Update End Sub Applications FRCApplications Object Overview Description This object is a general-purpose collection of application specific objects. Overview The Applications Object is a general-purpose collection of user objects. A reference to it is obtained through the FRCRobot.Applications Property. Applications may create custom object classes that organize robot access in ways that are helpful. For example, ArcTool uses weld schedules. The data for these schedules are in various System and KAREL variables. An arcwelding application might create an ArcSchedule object that exposed the parameters of the schedule as properties of the object. The object itself would access the appropriate system variables hiding the detail of how schedules are stored. Application data, such as weld schedules in the example above, is often robot specific. Most application modules share a reference to the Robot object as the preferred way to maintain access to the robot. The Applications collection is a mechanism that allows applications to store references to application specific objects and pass them around with the robot object. There is no restriction on type and quantity of objects added to the Applications collection. However, the preferred use of the Applications collection is to keep a reference to high level (collections of) application specific data. For example, the robot may do both spotwelding and dispensing. The Applications collection would then contain two objects – one that is a collection of spotwelding specific objects and one that is a collection of dispensing objects. It is expected that the application will always know the Key string by which the application specific object was added to the collection. In the example above, typical Key strings might be "Spot" and "Dispense". Good programming practice dictates that the application uses compile time constants to share this key. Objects in the collection may be fetched through the "Item" property or by using a For…Each loop. Properties Count As Long(read-only) Item (Key As String) As Object (read-only) Robot As FRCRobot (read-only) Methods Add(Key As String, AppObject As Object) Remove(Key As String) Events none FRCApplications Properties FRCApplications.Count Property Description Returns the number of objects in the Applications collection. Syntax lngCount = objMyApps.Count Parts lngCount As Long objMyApps As FRCApplications Remarks The Count property can be used to verify that the expected number of objects have been added to the Applications collection. See Also FRCApplications Object Overview Example ’ Find out how many entries are in the ’ Applications collection Dim objMyApps as FRCApplications Dim lngCount as Long Set objMyApps = gobjRobot.Applications lngCount = objMyApps FRCApplications.Item Property Description Returns an object from the Applications collection object. Syntax objMyAppObject = objMyApps.Item(strKey) Parts objMyAppObject As Object objMyApps As FRCApplications strKey As String Remarks Since the intent of the Applications collection is to keep a reference to high level (collection of) application specific data, it is expected that the application will always know the Key string by which the application specific object was added to the collection. If an application needs to be more flexible, its object can always implement a property that keeps the Key String. Then the application can use a "For Each" loop on the Applications object and query each object for its Key. See Also FRCApplications Object Overview frKeyNotFound Example ’ Retrieve a reference to my application object ’ that was added previously Dim objMyApps as FRCApplications Dim objMyAppObject as MyObjectClass Set objMyApps = gobjRobot.Applications Set objMyAppObject = objMyApps.Item("MyKey") FRCApplications Methods FRCApplications.Remove Method Description Removes an application specific object from the Applications collection. Syntax objMyApps.Remove(strKey) Parts objMyApps As FRCApplications strKey As String Remarks The application specific object associated with strKey is removed from the Applications collection. If a match to strKey is not found, the error frKeyNotFound is raised. See Also FRCApplications Object Overview FRCApplications.Add Method frKeyNotFound Example ’ When there is no more need to share my ’ application object, remove it. Dim objMyApps as FRCApplications Set objMyApps = gobjRobot.Applications objMyApps.Remove "MyKey" System Information FRCFeature FRCFeature Object Properties FRCFeature.OrderNumber Property Description This is a four character string that represents the order number of this feature (i.e. "H510"). Syntax [strOrderNumber = ]objFeature.OrderNumber Parts objFeature as FRCFeature strOrderNumber as String Remarks The order number is a unique descriptor that is generated by the controller build process tools. This property is the key that uniquely identifies a feature in the system, and is read from $FEATURE.$MOD[n]. See Also FRCFeature Object Overview Example ’Access the order number of a feature object Dim objMyFeature as FRCFeature Dim strFeatureOrderNumber as String strFeatureOrderNumber = objMyFeature.OrderNumber FRCFeatures FRCFeatures Object Properties FRCFeatures.Count Property Description Count returns the number of valid features loaded on the controller. Syntax [lngNumFeatures = ]objFeatures.Count Parts objFeatures as FRCFeatures lngNumFeatures as Long Remarks Use this property as the upper bounds in FOR or other looping constructs. See Also FRCFeatures Object Overview Example ’Figure out how many features are loaded Dim objMyFeatures as FRCFeatures Dim lngNumFeatures as Long lngNumFeatures = objMyFeatures.Count FRCSynchData FRCSynchData Object Properties FRCSynchData.Features Property Description This property returns a collection of objects representing all features that are loaded on the currently connected controller. Syntax [objRobotFeatures = ] objSynchData.Features Parts objSynchData as FRCSynchData objRobotFeatures as FRCFeatures Remarks The features collection is built from the controller’s $FEATURE system variables. It is generated automatically the first time this property is referenced. Use this property to access the list of valid features, which can be used to test for presence/absence of a specific feature. See Also FRCSynchData Object Overview Example ’Access the controller’s feature set Dim objMySynchData as FRCSynchData Dim objMyFeatures as FRCFeatures set objMyFeatures = objMySynchData.Features FRCSysInfo FRCSysInfo Properties FRCSysInfo.Clock Property Description Returns/sets the date and time on the robot's system clock. Syntax datDateTime = objSysInfo.Clock objSysInfo.Clock = datDateTime Parts objSysInfo as FRCSysInfo datDateTime as Date Remarks The robot controller has an internal clock that keeps track of date and time even when the robot is powered off. This clock is used to time stamp all alarms and other miscellaneous robot events. You can use this property to read the controller’s clock to verify that the timestamps on alarms correlate to the data/time of the PC. You can also use FRCSysInfo.Clock to set the robot’s clock to match that of the PC. See Also FRCSysInfo Object Overview Example ' Set the robot's clock to the PC’s current date/time ' Private Sub SetDate() Dim objSysInfo As FRCSysInfo Set objSysInfo = mobjRobot.SysInfo objSysInfo.Clock = Date + Time End Sub FRCSysInfo.CMOS Property Description Returns the number of bytes of battery backed CMOS hardware configured on the controller. Syntax lngCMOSSize = objSysInfo. Parts objSysInfo as FRCSysInfo lngCMOSSize as Long Remarks Robot controllers can be configured with various sizes of battery backed random access memory (RAM). This property is called CMOS because this feature is implemented with CMOS static RAM hardware. See Also FRCSysInfo Object Overview Example ' Check the memory configuration of this controller ' Private Sub CheckMemConfig() Dim objSysInfo As FRCSysInfo Dim lngCMOS As Long Dim lngDRAM As Long Dim lngFROM As Long ' Get access to system information Set objSysInfo = mobjRobot.SysInfo ' Read CMOS memory size lngCMOS = objSysInfo.CMOS ' Read DRAM memory size lngDRAM = objSysInfo.DRAM ' Read FROM memory size lngFROM = objSysInfo.From End Sub FRCSysInfo.DRAM Property Description Returns the number of bytes of DRAM hardware configured on the controller. Syntax lngDRAMSize = objSysInfo.FROM Parts objSysInfo as FRCSysInfo lngDRAMSize as Long Remarks Robot controllers can be configured with various sizes of high speed Dynamic Random Access Memory (DRAM). Use this property to determine how much DRAM is on robot. See Also FRCSysInfo Object Overview Example ' Check the memory configuration of this controller ' Private Sub CheckMemConfig() Dim objSysInfo As FRCSysInfo Dim lngCMOS As Long Dim lngDRAM As Long Dim lngFROM As Long ' Get access to system information Set objSysInfo = mobjRobot.SysInfo ' Read CMOS memory size lngCMOS = objSysInfo.CMOS ' Read DRAM memory size lngDRAM = objSysInfo.DRAM ' Read FROM memory size lngFROM = objSysInfo.From End Sub FRCSysInfo.FROM Property Description Returns the number of bytes of Flash ROM (FROM) hardware configured on the controller. Syntax lngFROMSize = objSysInfo. FROMType Parts objSysInfo as FRCSysInfo lngFROMSize as Long Remarks Robot controllers can be configured with various amounts of Flash Read Only Memory (FROM, pronounced F-ROM). Use this property to determine how much FROM is on robot. See Also FRCSysInfo Object Overview Example ' Check the memory configuration of this controller ' Private Sub CheckMemConfig() Dim objSysInfo As FRCSysInfo Dim lngCMOS As Long Dim lngDRAM As Long Dim lngFROM As Long ' Get access to system information Set objSysInfo = mobjRobot.SysInfo ' Read CMOS memory size lngCMOS = objSysInfo.CMOS ' Read DRAM memory size lngDRAM = objSysInfo.DRAM ' Read FROM memory size lngFROM = objSysInfo.From End Sub FRCSysInfo.PermMemFree Property Description Returns the number available bytes in the PERM memory pool. Syntax lngPermFree = objSysInfo.PermMemFree Parts objSysInfo as FRCSysInfo lngPermFree as Long Remarks PERM memory is a portion of CMOS that contains system variables and KAREL variables that are maintained even when the power is turned off. See Also FRCSysInfo Object Overview Example ' Check the memory configuration of this controller ' Private Sub CheckPermMemPool() Dim objSysInfo As FRCSysInfo Dim lngFreeKB As Long Dim lngLargestKB As Long Dim lngTotalKB As Long Dim lngUsedKB As Long ' Get access to system information Set objSysInfo = mobjRobot.SysInfo ' Get size of the Perm memory pool in Kbytes. lngTotalKB = objSysInfo.PermMemTotal / 1024 ' Get # of available Kbytes in in the Perm pool. lngFreeKB = objSysInfo.PermMemFree / 1024 ' Get size of the largest free block ' in the Perm memory pool. lngLargestKB = objSysInfo.PermMemLargestFreeBlock / 1024 ' Get # of Kbytes used out of the Perm pool. lngUsedKB = objSysInfo.PermMemUsed / 1024 End Sub FRCSysInfo.PermMemLargestFreeBlock Property Description Returns the size of the largest free block in the PERM memory pool. Syntax lngPermLargestFreeBlock = objSysInfo.PermMemLargestFreeBlock Parts objSysInfo as FRCSysInfo lngPermLargestFreeBlock as Long Remarks PERM memory is a portion of CMOS that contains system variables and KAREL variables that are maintained even when the power is turned off. The largest free block is an indicator of how fragmented this memory pool is. See Also FRCSysInfo Object Overview Example ' Check the memory configuration of this controller ' Private Sub CheckPermMemPool() Dim objSysInfo As FRCSysInfo Dim lngFreeKB As Long Dim lngLargestKB As Long Dim lngTotalKB As Long Dim lngUsedKB As Long ' Get access to system information Set objSysInfo = mobjRobot.SysInfo ' Get size of the Perm memory pool in Kbytes. lngTotalKB = objSysInfo.PermMemTotal / 1024 ' Get # of available Kbytes in in the Perm pool. lngFreeKB = objSysInfo.PermMemFree / 1024 ' Get size of the largest free block ' in the Perm memory pool. lngLargestKB = objSysInfo.PermMemLargestFreeBlock / 1024 ' Get # of Kbytes used out of the Perm pool. lngUsedKB = objSysInfo.PermMemUsed / 1024 End Sub FRCSysInfo.PermMemUsed Property Description Returns the number of bytes used out of the PERM memory pool. Syntax lngPermUsed = objSysInfo.PermMemUsed Parts objSysInfo as FRCSysInfo lngPermUsed as Long Remarks PERM memory is a portion of CMOS that contains system variables and loaded programs that are maintained even when the power is turned off. PermFree + PermUsed does not always equal PermTotal because See Also FRCSysInfo Object Overview Example ' Check the memory configuration of this controller ' Private Sub CheckPermMemPool() Dim objSysInfo As FRCSysInfo Dim lngFreeKB As Long Dim lngLargestKB As Long Dim lngTotalKB As Long Dim lngUsedKB As Long ' Get access to system information Set objSysInfo = mobjRobot.SysInfo ' Get size of the Perm memory pool in Kbytes. lngTotalKB = objSysInfo.PermMemTotal / 1024 ' Get # of available Kbytes in in the Perm pool. lngFreeKB = objSysInfo.PermMemFree / 1024 ' Get size of the largest free block ' in the Perm memory pool. lngLargestKB = objSysInfo.PermMemLargestFreeBlock / 1024 ' Get # of Kbytes used out of the Perm pool. lngUsedKB = objSysInfo.PermMemUsed / 1024 End Sub FRCSysInfo.SystemMemLargestFreeBlock Property Description Returns the size of the largest free block in the SYSTEM memory pool. Syntax lngSystemLargestFree = objSysInfo. SystemMemLargestFreeBlock Parts objSysInfo as FRCSysInfo lngSystemLargestFree as Long Remarks SYSTEM memory is a portion of DRAM that contains the operating system. It is reloaded and initialized each time the controller is turned on. See Also FRCSysInfo Object Overview Example ' Check the memory configuration of this controller ' Private Sub CheckSystemMemPool() Dim objSysInfo As FRCSysInfo Dim lngFreeKB As Long Dim lngLargestKB As Long Dim lngTotalKB As Long Dim lngUsedKB As Long ' Get access to system information Set objSysInfo = mobjRobot.SysInfo ' Get size of the System memory pool in Kbytes. lngTotalKB = objSysInfo.SystemMemTotal / 1024 ' Get # of available Kbytes in in the System pool. lngFreeKB = objSysInfo.SystemMemFree / 1024 ' Get size of the largest free block ' in the System memory pool. lngLargestKB = objSysInfo.SystemMemLargestFreeBlock / 1024 ' Get # of Kbytes used out of the System pool. lngUsedKB = objSysInfo.SystemMemUsed / 1024 End Sub FRCSysInfo.SystemMemUsed Property Description Returns the number of bytes used out of the SYSTEM memory pool. Syntax lngSystemUsed = objSysInfo.SystemMemUsed Parts objSysInfo as FRCSysInfo lngSystemUsed as Long Remarks SYSTEM memory is a portion of DRAM that contains the operating system. It is reloaded and initialized each time the controller is turned on. See Also FRCSysInfo Object Overview Example ' Check the memory configuration of this controller ' Private Sub CheckSystemMemPool() Dim objSysInfo As FRCSysInfo Dim lngFreeKB As Long Dim lngLargestKB As Long Dim lngTotalKB As Long Dim lngUsedKB As Long ' Get access to system information Set objSysInfo = mobjRobot.SysInfo ' Get size of the System memory pool in Kbytes. lngTotalKB = objSysInfo.SystemMemTotal / 1024 ' Get # of available Kbytes in in the System pool. lngFreeKB = objSysInfo.SystemMemFree / 1024 ' Get size of the largest free block ' in the System memory pool. lngLargestKB = objSysInfo.SystemMemLargestFreeBlock / 1024 ' Get # of Kbytes used out of the System pool. lngUsedKB = objSysInfo.SystemMemUsed / 1024 End Sub FRCSysInfo.TempMemUsed Property Description Returns the number of bytes used out of the TEMP memory pool. Syntax lngTempUsed = objSysInfo.TempMemUsed Parts objSysInfo as FRCSysInfo lngTempUsed as Long Remarks TEMP memory is a portion of DRAM that contains buffers and local storage used by the operating system and KAREL programs. It is reloaded and initialized each time the controller is turned on. See Also FRCSysInfo Object Overview Example ' Check the memory configuration of this controller ' Private Sub CheckTempMemPool() Dim objSysInfo As FRCSysInfo Dim lngFreeKB As Long Dim lngLargestKB As Long Dim lngTotalKB As Long Dim lngUsedKB As Long ' Get access to system information Set objSysInfo = mobjRobot.SysInfo ' Get size of the Temp memory pool in Kbytes. lngTotalKB = objSysInfo.TempMemTotal / 1024 ' Get # of available Kbytes in in the Temp pool. lngFreeKB = objSysInfo.TempMemFree / 1024 ' Get size of the largest free block ' in the Temp memory pool. lngLargestKB = objSysInfo.TempMemLargestFreeBlock / 1024 ' Get # of Kbytes used out of the Temp pool. lngUsedKB = objSysInfo.TempMemUsed / 1024 End Sub FRCSysInfo.TPPMemFree Property Description Returns the number of byte available in the TPP memory pool. Syntax lngTPPFree = objSysInfo.TPPMemFree Parts objSysInfo as FRCSysInfo lngTPPFree as Long Remarks TPP memory is a portion of CMOS that contains Teach pendant programs. See Also FRCSysInfo Object Overview Example ' Check the memory configuration of this controller ' Private Sub CheckTPPMemPool() Dim objSysInfo As FRCSysInfo Dim lngFreeKB As Long Dim lngLargestKB As Long Dim lngTotalKB As Long Dim lngUsedKB As Long ' Get access to system information Set objSysInfo = mobjRobot.SysInfo ' Get size of the TPP memory pool in Kbytes. lngTotalKB = objSysInfo.TPPMemTotal / 1024 ' Get # of available Kbytes in in the TPP pool. lngFreeKB = objSysInfo.TPPMemFree / 1024 ' Get size of the largest free block ' in the TPP memory pool. lngLargestKB = objSysInfo.TPPMemLargestFreeBlock / 1024 ' Get # of Kbytes used out of the TPP pool. lngUsedKB = objSysInfo.TPPMemUsed / 1024 End Sub FRCSysInfo.TPPMemLargestFreeBlock Property Description Returns the size of the largest free block in the TPP memory pool Syntax lngTPPLargestFree = objSysInfo.TPPMemLargestFreeBlock Parts objSysInfo as FRCSysInfo lngTPPLargestFree as Long Remarks TPP memory is a portion of CMOS that contains Teach pendant programs. The units on value returned is bytes. See Also FRCSysInfo Object Overview Example ' Check the memory configuration of this controller ' Private Sub CheckTPPMemPool() Dim objSysInfo As FRCSysInfo Dim lngFreeKB As Long Dim lngLargestKB As Long Dim lngTotalKB As Long Dim lngUsedKB As Long ' Get access to system information Set objSysInfo = mobjRobot.SysInfo ' Get size of the TPP memory pool in Kbytes. lngTotalKB = objSysInfo.TPPMemTotal / 1024 ' Get # of available Kbytes in in the TPP pool. lngFreeKB = objSysInfo.TPPMemFree / 1024 ' Get size of the largest free block ' in the TPP memory pool. lngLargestKB = objSysInfo.TPPMemLargestFreeBlock / 1024 ' Get # of Kbytes used out of the TPP pool. lngUsedKB = objSysInfo.TPPMemUsed / 1024 End Sub FRCSysInfo.TPPMemUsed Property Description Returns the number of bytes used out of the TPP memory pool. Syntax lngTPPUsed = objSysInfo.TPPMemUsed Parts objSysInfo as FRCSysInfo lngTPPUsed as Long Remarks TPP memory is a portion of CMOS that contains teach pendant programs. See Also FRCSysInfo Object Overview Example ' Check the memory configuration of this controller ' Private Sub CheckTPPMemPool() Dim objSysInfo As FRCSysInfo Dim lngFreeKB As Long Dim lngLargestKB As Long Dim lngTotalKB As Long Dim lngUsedKB As Long ' Get access to system information Set objSysInfo = mobjRobot.SysInfo ' Get size of the TPP memory pool in Kbytes. lngTotalKB = objSysInfo.TPPMemTotal / 1024 ' Get # of available Kbytes in in the TPP pool. lngFreeKB = objSysInfo.TPPMemFree / 1024 ' Get size of the largest free block ' in the TPP memory pool. lngLargestKB = objSysInfo.TPPMemLargestFreeBlock / 1024 ' Get # of Kbytes used out of the TPP pool. lngUsedKB = objSysInfo.TPPMemUsed / 1024 End Sub FREStartModeConstants FREStartModeConstants Overview Description An enumeration of constants used to identify the start mode in which the controller is running. Overview The robot controller can be running in one of four modes – called Start Modes. Three of these modes allow your PC application to connect to the controller. The set of valid operations that your PC application can perform through the Robot Server is dependant on the start mode. Use the FRCSysInfo.StartMode property and these constants to detect in which start mode the robot is running then adjust your application accordingly. Values Error! Hyperlink reference not valid. Error! Hyperlink reference not valid. frHotStart frInitStart See Also FRCSysInfo.StartMode Property Robot Neighborhood Object Interface FRCRobotNeighborhood FRCRobot Neighborhood Properties FRCRobotNeighborhood.DefaultAutoReconnectNumRetries Property Description Sets/returns the default setting for AutoReconnectNumRetries Syntax [lngNumRetries] = objRN.DefaultAutoReconnectNumRetries Parts objRN as FRCRobotNeighborhood lngNumRetries as Long Remarks When a new FRCRNRealRobot or FRCRNVirtualRobot is added to the neighborhood, its AutoReconnectNumRetries property is initialized to the value of this property. Set this property to reflect the most general policy that applies to your specific application environment. Special cases can be handled by modifying the properties of the RNRobot object itself after it is created. See Also Error! Hyperlink reference not valid. FRCRNRobots.AddRealRobot Method FRCRNRobots.AddVirtualRobot Method FRCRNRobotNeighborhood Object Overview FRCRobotNeighborhood.StartModeAutoDelay Property Description Sets/returns the amount of time that the Robot Neighborhood delays when automatically switching between start modes. Syntax [lngDelay] = objRN.StartModeAutoDelay Parts objRN as FRCRobotNeighborhood lngDelay as Long Remarks When a virtual robot is being created, it delays in the initial Controlled start mode for a number of seconds to ensure that all initialization has completed. After this delay, the RN automatically commands the virtual robot to go to Cold start mode. When the virtual robot is being recreated from a backup, the RN automatically sends it through Controlled to Cold to Controlled to Cold start modes delaying before each transition. The default delay is tuned conservatively to ensure that the virtual robot is successfully created on the widest variety of PCs. If you have a very fast PC, you can experimentally reduce this value to shorten the virtual robot creation time. Increase this value if you have a slow PC and find that virtual robots are not reliably completing the creation process. See Also FRCRNVirtualRobot.Start Method Error! Hyperlink reference not valid. FRCRobotNeighborhood.VirtualRestartTolerance Property Description Sets/returns the amount of time that the Robot Neighborhood will tolerate for the virtual robot to shut down. Syntax [lngDelay] = objRN.VirtualRestartTolerance Parts objRN as FRCRobotNeighborhood lngDelay as Long Remarks When a virtual robot is stopped, it takes a while to release all of its resources and terminate. Control is returned to your application immediately after executing the FRCRobotNeighborhood.Stop method, but the virtual robot continues its work of cleaning up. If you call the FRCRobotNeighborhood.Start method too soon after the FRCRobotNeighborhood.Stop method, the Robot Neighborhood will detect that the virtual robot is still cleaning up. This property determines how long the Robot Neighborhood will wait before returning the frRNRunRequestFailed error. See Also FRCRNVirtualRobot.Start Method FRCRNVirtualRobot.Stop Method Error! Hyperlink reference not valid. FRCRNRobots FRCRNRobots Properties FRCRNRobots.Count Property Description Returns the number of items within this object. Syntax [intCount = ]objRNRobots.Count Parts objRNRobots as FRCRNRobots intCount as Integer Remarks The count includes the FRCRNRobots and FRCRNRobot that are the direct children of this FRCRNRobots object. See Also FRCRNRobots Object Overview Example ' Find out how many entries are at the root ' of the Robot Neighborhood Dim objRNRobots As FRCRNRobots Dim intNum As Integer Set objRNRobots = gobjRN.Robots intNum = objRNRobots.Count FRCRNRobots.Item Property Description Returns an FRCRNRobots or FRCRNRobot object from the collection. Syntax [objRNR =] objRobots.Item(strName) [objRNR =] objRobots.Item(Index:=intIndex) Parts objRobots as FRCRNRobots objRNR as FRCRobots | FRCRobot strName as String intIndex as Integer Remarks strName is the friendly name used for accessing a robots collection or a specific robot in the robot neighborhood. It has the form: [\]Robots1\[Robots2\[…\RobotsN\]] or [\][Robots1\][Robots2\[…\RobotsN\]]]RobotName The first form specifies a robots collection because it ends with a backslash. The second form specifies an individual robot. The Robots collection names concatenated and separated by the backslash specify a path and follow rules similar to the Windows file system path string. The presence or absence of the leading backslash determines initial search point. If it is present, the search begins at the root of the RN. If it is absent, the search begins at the objRNRobots object on which the Item property is being called. If the optional […] elements are not provided, the robot item must exist within the objRobots object itself. Robots collection and robot name strings can contain any character that is legal for file and directory names. Since the Item property identifies robots collection names as those ending with a backslash, the collection can contain a robot with the same name as the collection. See Also FRCRNRobot Obect Overview FRCRNRobots Object Overview FRCRNRobots.Name Property Description Returns/Sets the name of this robots collection. Syntax [strName =] objRobots.Name objRobots.Name = strName Parts objRobots as FRCRNRobots strName as String Remarks strName is the short name used for identifying this robots collection. This is most useful for displaying the tree view of the RN. This property does not contain the trailing backslash that is required for identifying this object in an FRCRNRobots.Item call. Use the PathName property for the fully decorated name including all path stops required to identify this object relative to the root of the RN. Setting the Name causes a OnOrganizationChange event on this object and all of its dependents so that they can know that a different path name will be required if they are to be accessed PathName has changed. See Also FRCRNRobots.PathName Property FRCRNRobots Object Overview FRCRNRobot FRCRNRobot Properties FRCRNRobot.HeartbeatEnable Property Description Returns/sets the enable status of the Heartbeat feature. Syntax [blnHeartbeat]objRNRobot.HeartbeatEnable objRNRobot. HeartbeatEnable = blnHeartbeat Parts objRNRobot as FRCRNRobot blnHeartbeatt as Boolean Remarks By setting the value to TRUE the Heartbeat feature will be enabled; otherwise it will be disabled. This feature can be enabled or disabled for all connection types. Note: Multiple clients have the ability to enable/disable this feature, therefore client applications must coordinate use of this property. See Also FRCRNRobot.HeartbeatPeriod Property FRCRNRealRobot Object Overview FRCRNVirtualRobot Object Overview FRCRNRobot Object Overview Example Dim objRN As FRCRobotNeighborhood Dim objRNRobot As FRCRNRobot ' Get a copy of the Robot Neighborhood Set objRN = New FRCRobotNeighborhood ' Get access to my Robot Set objRNRobot = objRN.Robots.Item("\MyRobot") ' Set AutoReconnect to try 5 times objRNRobot.AutoReconnectNumRetries = 5 ' Set AutoReconnect to retry every 60 seconds objRNRobot.AutoReconnectPeriod = 60 ' Enable the AutoReconnect feature objRNRobot.AutoReconnectEnable = True FRCRNRobot.HeartBeatPeriod Property Description Returns/sets the frequency for which the monitoring of the physical connection to a robot is executed. Syntax lngHeartBeat = objRNRobot.HeartBeatPeriod objRNRobot.HeartBeatPeriod = lngHeartBeat Parts objRNRobot as FRCRNRobot lngHeartBeat as Long Remarks This property determines the rate at which the HeartBeat "beats" between the Robot Neighborhood and the controller in which it is connected. Value must be greater than zero. The value is in units of seconds. See Also FRCRNRobot.HeartbeatEnable Property FRCRNRealRobot Object Overview FRCRNVirtualRobot Object Overview FRCRNRobot Object Overview Example Dim objRN As FRCRobotNeighborhood Dim objRNRobot As FRCRNRobot ' Get a copy of the Robot Neighborhood Set objRN = New FRCRobotNeighborhood ' Get access to my Robot Set objRNRobot = objRN.Robots.Item("\MyRobot") ' Enable Heartbeat at a period of 20 seconds objRNRobot.HeartBeatPeriod = 20 FRCRNRobot.KeepAliveDuration Property Description Returns/sets the amount of time that the Robot Neighborhood will keep the Robot Object active after all connections are released. Syntax [lngKeepAlive = ]objRNRobot.KeepAlive Parts objRNRobot as FRCRNRobot lngKeepAlive as Long Remarks The units for this property are in minutes. The value must be greater than zero. See Also FRCRNRobot.KeepAliveEnable Property FRCRNRealRobot Object Overview FRCRNVirtualRobot Object Overview FRCRNRobot Object Overview Exampl Dim objRN As FRCRobotNeighborhood Dim objRNRobots As FRCRNRobots Dim objRNRobot As FRCRNRobot ' Get a copy of the Robot Neighborhood Set objRN = New FRCRobotNeighborhood ' Get the connections collection Set objRNRobots = objRN.Connections ' Get a connection Set objRNRobot = objRNRobots.Item("MyRobot") ' Turn on KeepAlive for 20 minutes objRNRobot.KeepAlive = 20 FRCRNVirtualRobot FRCRNVirtualRobot Methods FRCRNVirtualRobot.Start Method Description Starts a virtual robot in the specified mode. Syntax [enuStatus = ]objVRobot.Start( enuMode [,blnAutoRecover [, strBackupPath]] ) Parts objVRobot As FRCRNVirtualRobot enuMode as FRERNStartModeConstants blnAutoRecover as Boolean strBackupPath as String enuStatus as FRERNVirtualStartStatusConstants Remarks If the virtual robot is already running in the requested mode, the value for current start mode is returned. If the virtual robot is currently running in a start mode that is not compatible with the requested mode, the frRNIncompatibleStartModeRequested error is raised. The following is a list of incompatible modes. Requested Incompatible modes fRNControlledStartMode frRNColdStartMode, frRNRecoveryInProgress frRNColdStartMode frRNRecoveryInProgress frRNDontCareStartMode none If the virtual robot is not currently running, the startup is initiated and the status frRNStartupInProgress is returned. Use the OnStartModeChange event to detect when it completes. You can also use the OnStartSequenceChange to monitor the starttp progress. The events from the FRCRNService objects can also be used to direct changes for your application to take action. Details of specific start mode requests follow. frRNDontCareStartMode – Specify this start mode to reliably ensure that the virtual robot is running and you are willing to deal with the various start modes in which it can be in. frRNInitStartMode - Specify this start mode to create the virtual robot or to reinit an existing one. The following files must be present when this method is called. All files are relative to the path identified in the Location property. - orderfile.dat - group0.dt, group1.dt … - FileBackup\*.* (file set created with the controller File Backup All function) frRNControlledStartMode – Specify this start mode to make sure it is not currently running in one of the incompatible modes. frRNColdStartMode - Specify this start mode to make it is not currently running in one of the incompatible modes. Note that the robot may stop in the controlled start mode if that was where it was left when it was last stopped. It will be your responsibility to send it to cold start. If blnAutoRecover is TRUE and the files in the folder indicated by the Location property do not contain a valid virtual controller, then a recovery from a backup will be attempted. blnAutoRecover defaults to TRUE. If strBackupPath is provided, then the backup information is retrieved from that location. If no path is provided, the virtual controller is restored from its most recent backup. Use the FRCRNVirtualRobot.Backup method to save a backup of the virtual robot. The recovery process takes the virtual controller through initial start, controlled start, cold start, and controlled start. A final transition to colde start will be performed if enuMode is frRNColdSartMode or frRNDontCareMode. During the first four transitions, the StartMode property returns frRNRecoveryInProgress. During the final transition from controlled start to cold start, the StartMode property returns frRNStartupInProcress. The file RecoveryLog.txt is generated during the recovery process. It will contain some lines with "status = 15000E" for TP programs that could not be reloaded. These are typically protected system TP programs that need not be reloaded for a successful recovery. If, however, you are a very advanced user and have modified some of these programs, use RecoveryLog.txt to identify them and reload them manually following the same precautions you followed when you made the original modifications. A number of checks are made while preparing to start the virtual controller. Errors are raised before the Start method returns if any of these checks fail. Additional errors that occur while the StartMode is frRNStartupInProgress or frRNRecoveryInProgress are raised through the OnError Event. See Also FRERNStartModeConstants Overview FRCRNVirtualRobot.Backup Method FRCRNVirtualRobot_OnStartModeChange Event FRCRNVirtualRobot_OnError Event FRERNErrorConstants Overview FRCRNVirtualRobot Object Overview FRCRNVirtualRobot.Stop Method Description Stops the virtual robot. Syntax objVRobot.Stop Parts objVRobot As FRCRNVirtualRobot Remarks The virtual robot is automatically stopped when all references to it through the Robot Neighborhood are released. This method provides some extra features. It stops the virtual controller no matter how many references there are to it. In effect, it causes the virtual robot to act like a real robot when the power is turned off. Other applications will have to deal with the fact that the virtual robot has gone away. In the normal sequence of events, Windows can take a few seconds to orderly terminate a process. This Stop method ensures that the virtual controller is fully terminated before returning. It forcibly terminates the process if necessary. If the virtual controller was running when the Stop method is called, the Stop method waits an additional time to allow Windows to do its work before forcibly terminating it. You can adjust this time with the FRCRNRobotNeighborhood.VirtualRestartTolerance property. See Also Error! Hyperlink reference not valid. FRCRNVirtualRobot Object Overview FRCRNRDMResponses FRCRNRDMResponses Properties FRCRNRDMResponses.Item Property Description Returns an FRCRNResponse object as specified. Syntax [objResponse = ]objRDMResponses.Item(strIPAddress ) or [objResponse = ]objRDMResponses.Item( Index:=lngIndex ) Parts objRDMResponses as FRCRNRDMResponses strIPAddress as String lngIndex as Long Remarks A robot will be represented in the collection if has recently responded to the RDM request. Responses are uniquely identified by IPAddress. Items in the collection are also available by using the Visual Basic For…Each operator or the C enumeration property. For Each is a preferred method over using the Index:= argument. If the response does not exist, an error is thrown.. See Also FRCRNRDMResponse Object Overview FRCRNRDMResponses Object Overview FRCRNRDMResponses Methods FRCRNRDMResponses.DoScan Method Description Directs the Neighborhood to perform a scan of the nextwork immediately and update its collection of responses. Syntax objRDMResponses.DoScan Parts objRDMResponses as FRCRNRDMResponses Remarks A scan involves the Robot Neigborhood broadcasting an RDM request on the subnet and monitoring the responses. The collection of responses is updated based on the responses received. DoScan initiates this process immediately even if AutoScanEnalbe is True. This enables you to ensure that a scan has been done recently. . See Also FRCRNRDMResponses Object Overview FRCRNServices FRCRNServices Properties FRCRNServices.Count Property Description Returns the number of services that are available on this robot. Syntax lngNumServices = objServices.Count Parts objServices as FRCRNServices lngNumServices as Long Remarks For virtual robots, this property will return zero if the robot is not running. For real robots, this will return the number of TCP/IP services possible on an RJ3 and later robot. You must check the state of a service individually to determine if it is currently active on the robot. See Also FRCRNService Object Overview FRCRNServices Object Overview FRCRNServices.Item Property Description Returns an FRCRNService object as specified. Syntax [objService = ]objRNServices.Item( lngServiceID ) or [objService = ]objRNServices.Item( Name:=strName ) or [objService = ]objRNServices.Item( Index:=lngIndex ) Parts objRNServices as FRCRNServices lngServiceID as FRCRNServiceIDConstants strName as String lngIndex as Long Remarks Items in the collection are also available by using the Visual Basic For…Each operator or the C enumeration property. For Each is a preferred method over using the Index:= argument. The valid service ID’s are enumerated by the class FRERNServiceIDConstants. Each has an associated name that can be used instead. If the service does not exist, an error is thrown. See Also FRERNServiceIDConstants Overview FRCRNService Object Overview FRCRNServices Object Overview FRCRNService FRCRNService Object Overview Description Provides information about a TCP/IP service running on the robot. Overview Use the FRCRNService object to query for port names and numbers for a specific TCP/IP service. Even though port numbers are fixed for real robots, it is advisable to use this class so that your code is ready to be redirected to a virtual robot if required. The services covered include: CGTP – Color Graphic TP (iPendant) FTP – File Transfer Protocol KCL – Karel Command Language Console RDM – Robot Discovery Method RPCMain – Robot Server Interface (PCIF) SMON – System Monitor Console SNPX – Serial Network Protocol Exchange TeachPendant – Legacy TP key input (Virtual only) Telnet – Telnet protocol TP_INPUT – iPendant key input (Virtual Only) Web – HTTP server Properties ID as FRERNServiceConstants (read-only) Name as String (read-only) Parent as FRCRNServices (read-only) PortNum as long (read-only) State as FRERNServiceState (read-only) Methods None. Events OnStateChange(ByVal NewState as FRERNServiceState) See Also FRCRNServices Object Overview FRCRNService Properties FRCRNService.Parent Property Description Returns the parent of this object. Syntax [Set objMyParent =] objServices.Parent Parts objServices as FRCRNServices objMyParent as FRCRNRobot Remarks The parent object is always an FRCRNRobot class type. See Also FRCRNServices Object Overview FRCRNService Object Overview FRCRNService Events FRCRNService_OnStateChange Event Description This event notifies the client when a service has changed state on the controller. Syntax Private sub objService_OnStateChange( NewState as FRERNServiceStateConstants ) Parts objService As FRCRNService Remarks This event will be fired any time a service is started or stopped. This event is only fired for Virtual Robots. See Also Error! Hyperlink reference not valid. FRCRNService Object Overview FRURNSelect FRURNSelect Properties FRURNSelect.AllowFRCRNRealRobot Property Description Sets/Returns whether FRCRNRealRobot type selections are allowed. Syntax fruRNSelect1.AllowFRCRNRealRobot = True Parts fruRNSelect1 As FRURNSelect Remarks Setting this property to True will enable the user to select a real robot from the neighborhood. Conversely, setting it to False will guarantee that an FRCRNRealRobot type object is not returned from the ShowSelect method. See Also FRURNSelect.ShowSelect Method FRURNSelect Object Overview Example See the example under the FRURNSelect.ShowSelect Method topic. Constant Enumerations FRERNErrorConstants frRNHostNameIsInvalid Description The HostName supplied is invalid.. Remarks See Also FRERNErrorConstants Overview frRNVirtualFatalErrorDuringRecovery Description The Virtual Controller encountered a fatal error during recovery. Remarks This error code is returned with the OnError event if an problem is encountered that keeps the recovery process from completing. The contents of RecoveryLog.txt may shed some light on the cause. During the recovery sequence, the controller makes automatic transitions from controlled start to cold start then back to controlled start. By default, the Robot Neighborhood delays 7 seconds before it initiates each of these transitions. It is possible that the frRNVirtualFatalErrorDuringRecovery error is caused because the combination of Application Tool and robot options configured on the virtual robot being recovered needs more time. In this unlikely event, you can try creating the registry DWORD values: GoToColdDelay GoBackToControlDelay under HKLM\SOFTWARE\FANUC\FANUC Robotics Robot Neighborhood They are represented in milliseconds. A copy of the original virtual robot is stored in a folder at the same level as the virtual robot. It is named with "_tmp_RN_recover" appended to the original virtual folder name. See Also FRCRNVirtualRobot.Start Method FRCRNVirtualRobot_OnError Event FRERNErrorConstants Overview frRNVirtualVersionNotSupported Description This version of the virtual controller is not supported. Remarks This indicates that the version of the FANUC Robotics Virtual Robot Controller V#.## product required to support this FRCRNVirtualRobot is not installed. This error occurs when the FRCRNVirtualRobot.Start method compares the primary version number V#.## of the virtual robot neighborhood item with the versions of FANUC Robotics Virtual Robot Controller’s installed. See Also FRCRNVirtualRobot.Version Property FRCRNVirtualRobot.Start Method FRERNErrorConstants Overview FRERNServiceIDConstants frRNFTPServiceID Description Indicates the FTP service over TCP/IP. Remarks Use this constant to identify the FTP (File Transfer Protocol) service See Also FRERNServiceIDConstants Overview frRNKCLServiceID Description Indicates the KCL service over TCP/IP using telnet protocol. Remarks Use this constant to identify the service to support the KAREL Command Language (KCL) over TCP/IP. Connect using the Telnet protocol, See Also FRERNServiceIDConstants Overview frRNRDMServiceID Description Indicates the RDM service over TCP/IP. Remarks Use this constant to identify the RDM (Robot Discovery Method) service See Also FRERNServiceIDConstants Overview FRERNServiceStateConstants FRERNServiceStateConstants Overview Description An enumeration of constants used to determine the state of a robot’s TCP/IP service. Overview Values frRNServiceStateStarted frRNServiceStateStopped frRNServiceStateUnknown See Also FRCRNService.State Property FRERNStartModeConstants frRNRecoveryInProgress Description Indicates that the virtual robot is being recovered from a backup. Remarks The recovery process takes the virtual controller through initial start, controlled start, cold start and controlled start. During the first four transitions ending with the second controlled start, the StartMode property returns frRNRecoveryInProgress. If the target start mode is cold start, the final transition from controlled start to cold start, the StartMode property returns frRNStartupInProcress. See Also FRERNStartModeConstants Overview frRNStartupInProgress Description Indicates that the virtual robot is currently starting. Remarks If the virtual robot is not currently running, the startup is initiated and the status frRNStartupInProgress is returned. Use the StartSequence and OnStateChange events to monitor its progress. The events from the FRCRNServices object can also be used to direct the actions of your application See Also FRERNStartModeConstants Overview FRERNRDMFlagConstants frRNRDMDNSFlag Description Indicates that the domain name server communication feature is supported. Remarks Use this constant as the argument to the FRCRNRDMResponse.IsSupported property to determine if the domain name server communication feature is supported on the robot. It can also be used to decode the value returned by the FRCRNRDMResponse.Flags property. See Also FRCRNRDMResponse.Flags Property FRCRNRDMResponse.IsSupported Property FRERNRDMFlagConstants Overview frRNRDMEGDFlag Description Indicates that the Ethernet global data communication feature is supported. Remarks Use this constant as the argument to the FRCRNRDMResponse.IsSupported property to determine if the Ethernet global data communication feature is supported on the robot. It can also be used to decode the value returned by the FRCRNRDMResponse.Flags property. See Also FRCRNRDMResponse.Flags Property FRCRNRDMResponse.IsSupported Property FRERNRDMFlagConstants Overview frRNRDMEIPFlag Description Indicates that the Ethernet IP communication feature is supported. Remarks Use this constant as the argument to the FRCRNRDMResponse.IsSupported property to determine if the Ethernet IP communication feature is supported on the robot. It can also be used to decode the value returned by the FRCRNRDMResponse.Flags property. See Also FRCRNRDMResponse.Flags Property FRCRNRDMResponse.IsSupported Property FRERNRDMFlagConstants Overview frRNRDMFTPFlag Description Indicates that the File Transfer Protocol communication feature is supported. Remarks Use this constant as the argument to the FRCRNRDMResponse.IsSupported property to determine if the File Transfer Protocol communication feature is supported on the robot. It can also be used to decode the value returned by the FRCRNRDMResponse.Flags property. See Also FRCRNRDMResponse.Flags Property FRCRNRDMResponse.IsSupported Property FRERNRDMFlagConstants Overview frRNRDMProfiSFlag Description Indicates that the ProfiBus slave only communication feature is supported. Remarks Use this constant as the argument to the FRCRNRDMResponse.IsSupported property to determine if the ProfiBus slave only communication feature is supported on the robot. It can also be used to decode the value returned by the FRCRNRDMResponse.Flags property. See Also FRCRNRDMResponse.Flags Property FRCRNRDMResponse.IsSupported Property FRERNRDMFlagConstants Overview frRNRDMRLinkAFlag Description Indicates that the Robot Link APDT communication feature is supported. Remarks Use this constant as the argument to the FRCRNRDMResponse.IsSupported property to determine if the Robot Link APDT communication feature is supported on the robot. It can also be used to decode the value returned by the FRCRNRDMResponse.Flags property. See Also FRCRNRDMResponse.Flags Property FRCRNRDMResponse.IsSupported Property FRERNRDMFlagConstants Overview frRNRDMRlinkCFlag Description Indicates that the Robot Link coordinated communication feature is supported. Remarks Use this constant as the argument to the FRCRNRDMResponse.IsSupported property to determine if the Robot Link coordinated communication feature is supported on the robot. It can also be used to decode the value returned by the FRCRNRDMResponse.Flags property. See Also FRCRNRDMResponse.Flags Property FRCRNRDMResponse.IsSupported Property FRERNRDMFlagConstants Overview frRNRDMRlinkSFlag Description Indicates that the Robot Link simultaneous communication feature is supported. Remarks Use this constant as the argument to the FRCRNRDMResponse.IsSupported property to determine if the Robot Link simultaneous communication feature is supported on the robot. It can also be used to decode the value returned by the FRCRNRDMResponse.Flags property. See Also FRCRNRDMResponse.Flags Property FRCRNRDMResponse.IsSupported Property FRERNRDMFlagConstants Overview frRNRDMTelnetFlag Description Indicates that the Telnet communication feature is supported. Remarks Use this constant as the argument to the FRCRNRDMResponse.IsSupported property to determine if the Telnet communication feature is supported on the robot. It can also be used to decode the value returned by the FRCRNRDMResponse.Flags property. See Also FRCRNRDMResponse.Flags Property FRCRNRDMResponse.IsSupported Property FRERNRDMFlagConstants Overview Optimizing Data Access Optimizing Data Access Robot Server default settings assume that your application needs to have the most update to date robot data available. This means that every time you read a value, the Robot Server reads directly from the robot. Also, every time you write a value, it is immediately sent to the robot. Data access is performed using the TCP/IP network. Your application can access data more efficiently by exploiting certain characteristics associated with the TCP/IP network protocol. Each call through the TCP/IP protocol requires an overhead processing time. This overhead processing time accounts for the majority of the data transfer time between the PC and the FANUC Robotics/FANUC controller. Another exploitable characteristic of the TCP/IP protocol is that the overhead processing time does not significantly change with the size to the data being transmitted. Therefore, if your application can make less calls between the PC and the FANUC Robotics/FANUC controller, the better the performance. This requires your application to be written in such a way that it can get more data per call to the FANUC Robotics/FANUC controller. This help section explains how to optimize your PC application to minimize unnecessary network activity for the most efficient data access. Objects that deal with variables and I/O have the following properties and methods to optimize access. • • • • NoRefresh Property Refresh Method NoUpdate Property Update Method The NoRefresh property and Refresh method control how data is read from the robot. The NoUpdate property and Update method control how information is written to the robot. Scattered Access is another powerful tool that enables you to access a combination of several data types with one network exchange. These data types include: • • • Variables Positions I/O Optimizing Variable Access Special Variable Types Efficient Access to Paths NoRefresh and NoUpdate are efficient for large structures because the data under control of an FRCVars class object is usually stored in the robot in contiguous memory. A Path data type is one of three exceptions. A block read for a path variable is limited to a node by node basis. Nodes can be very large and NoRefresh can still provide a significant performance improvement. However, there will always be at least one robot access per node to get the path data into the Robot Server. The following path structure, PTH, is used to illustrate this. ' ' Using NoRefresh on a Path variable type ' Private Sub Paths() Dim objPTH As FRCVars Dim enuSMT As FREMotionTypeConstants ' The Robot Server accesses the robot at this point for ' type information to initialize the object. Set objPTH = mobjRobot.Programs("MYPROG").Variables("PTH") ' Flag the Structure as NoRefresh. ' Both PTH.NODEDATA[1] and PTH.NODEDAT[2] are read into ' PC memory at this time. It takes two separate robot ' accesses to get the data. This could be very time ' consuming for large paths. objPTH.NoRefresh = True ' This access is quick because the Robot Server ' has the value in local memory. enuSMT = objPTH("NODEDATA")("1")("GROUP_DATA").SegMoType End Sub If you read the value of objPTH.NoRefresh, it will equal false. This is because the setting of NoRefresh = True is propagated to the nodes and path header on which it works. It is not remembered on the FRCVars object of the PATH variable itself because the data controlled by that object can’t be read as one block. This same rule applies to the FRCVars object of NODEDATA. Scattered Access Scattered Access Overview The NoRefresh and NoUpdate features of the Robot Server take advantage of the fact that structures and arrays are stored in contiguous memory. If the robot programs are designed properly, these features can be used effectively to create an efficient, high speed PC application. In many cases, you do not have this luxury. The robot program might be developed long before the data access requirements of its companion PC application are considered. It is also very likely that the PC application must access system information (Sysvars, I/O, Registers) along with variables from multiple programs in a coordinated manner. Scattered Access is a way to read and write multiple independent robot variables, I/O signals, numeric registers and system positions with one network access. This has the potential to increase Robot Server performance by reducing network communication overhead. KAREL Builtins Robot-PC Communication KAREL Built-ins The KAREL language provides several built-ins that support communication with the PC through the Robot Server. They can be classified into two major categories: • • PacketEvent KAREL Built-Ins Data Acquisition KAREL Built-Ins PacketEvent KAREL Built-Ins SEND_DATAPC Built-In Description Send an event message and other data to the PC. Syntax END_DATAPC(req_code, dat_buffer, status) Input/Output Parameters: [in] req_code :INTEGER [in] dat_buffer :ARRAY OF BYTE [out] status :INTEGER Remarks req_code - request code that uniquely identifies this event. Valid values are 0 to 255. dat_buffer - an array of bytes. The KAREL built–ins ADD_BYNAMEPC, ADD_INTPC, ADD_REALPC, and ADD_STRINGPC can be used to format a KAREL byte buffer. The actual data buffer format depends on the needs of the PC. There is no error checking of the dat_buffer format on the controller. status - the status of the attempted operation. If not 0, then an error occurred and the event request was not sent to the PC. See Also Error! Hyperlink reference not valid. ADD_INTPC Built–In ADD_REALPC Built–In Error! Hyperlink reference not valid. FRCPacketEvents Object Overview FRCPacket.DecodeBody Method Example The following example sends event 12 to the PC with a data buffer. PROGRAM TESTDATA %ENVIRONMENT PC CONST er_abort = 2 VAR dat_buffer: ARRAY[100] OF BYTE index: INTEGER status: INTEGER BEGIN index = 1 ADD_INTPC(dat_buffer,index,55,status) ADD_REALPC(dat_buffer,index,123.4,status) ADD_STRINGPC(dat_buffer,index,’YES’,status) -- send event 12 and data buffer to PC SEND_DATAPC(12,dat_buffer,status) -- call built-in here IF status<>0 THEN POST_ERR(status,‘ ‘,0,er_abort) ENDIF END TESTDATA ADD_REALPC Built-In Description Add a REAL value (type 17 - 11 HEX) into a KAREL byte data buffer. Syntax ADD_REALPC(dat_buffer, dat_index, number, status) Input/Output Parameters : [in] dat_buffer :ARRAY OF BYTE [in,out] dat_index :INTEGER [in] number :REAL [out] status :INTEGER Remarks dat_buffer - an array of bytes. dat_index - the starting byte number to place the real value. number - the real value to place into the buffer. status - the status of the attempted operation. If not 0, then an error occurred and data was not placed into the buffer. The KAREL built–ins ADD_BYNAMEPC, ADD_INTPC, ADD_REALPC, and ADD_STRINGPC can be used to format a KAREL byte buffer in the following way: REAL data is added to the buffer as follows (buffer bytes are displayed in HEX): beginning index = dat_index 2 bytes - variable type 4 bytes - the number 2 bytes of zero (0) - end of buffer marker The following is an example of an REAL placed into a KAREL array of bytes starting at index = 1: 0 11 43 AC CC CD 0 0 where: 0 11 = REAL variable type 43 AC CC CD = real number 345.600006 0 0 = end of data in the buffer On return from the built–in, index = 7. See Also SEND_DATAPC Built–In Error! Hyperlink reference not valid. ADD_INTPC Built–In Error! Hyperlink reference not valid. FRCPacketEvents Object Overview FRCPacket.DecodeBody Method Example Refer to the TESTDATA example in the built–in function SEND_DATAPC. Data Acquisition KAREL Build-Ins DAQ_CHECKP Built-In Description Check the status of a pipe and the number of bytes available to be read from the pipe. Syntax DAQ_CHECKP(pipe_num, pipe_stat, bytes_avail) Input/Output Parameters: [in] pipe_num :INTEGER [out] pipe_stat :INTEGER [out] bytes_avail :INTEGER Remarks pipe_num – The number of the pipe (1 – 5) to check. pipe_stat – The status of the pipe, returned. The status is a combination of the following flags: DAQ_PIPREG – pipe is registered (value = 1) DAQ_ACTIVE – pipe is active, i.e., has been started (value = 2) DAQ_CREATD – pipe is created (value = 4) DAQ_SNAPSH – pipe is in snapshot mode (value = 8) DAQ_1STRD – pipe has been read for the first time (value = 16) DAQ_OVFLOW – pipe is overflowed (value = 32) DAQ_FLUSH – pipe is being flushed (value = 64) bytes_avail – The number of bytes that are available to be read from the pipe. The pipe_stat returned parameter can be AND’ed with the above flag constants to determine whether the pipe is registered, is active, etc. For example, you will most likely wish to check if the pipe is active before writing to it. The DAQ_OVFLOW flag will never be set for the task that writes to the pipe when it calls DAQ_CHECKP. This flag applies only to tasks that read from the pipe. See Also: Data Acquisition KAREL Built-Ins DAQ_WRITE Built-In FREPipeStateConstants Example Refer to the DAQWRITE example in the built–in function DAQ_WRITE. DAQ_WRITE Built-In Description Write data to a KAREL pipe. Syntax DAQ_WRITE(pipe_num, prog_name, var_name, status) Input/Output Parameters [in] pipe_num :INTEGER [in] prog_name :STRING [in] var_name :STRING [out] status :INTEGER Remarks pipe_num – The number of the pipe (1 – 5) to be written to. prog_name – The name of the program containing the variable to be written. If passed as an empty string, the name of the current program is used. var_name – The name of the variable to be written. status - The status of the attempted operation. If not 0, then an error occurred and the data was not written. You do not have to use the same variable for writing data to the pipe that was used to register the pipe. The only requirement is that the data type of the variable written matches the type of the variable used to register the pipe. If a PC application is monitoring the pipe, each call to DAQ_WRITE will result in an FRCPipe_Receive event being raised. See Also: Data Acquisition KAREL Built-Ins FRCPipe_Receive Event Example The following example registers KAREL pipe 2 and writes to it when the pipe is active. PROGRAM DAQWRITE %ENVIRONMENT DAQ %ENVIRONMENT SYSDEF CONST er_abort = 2 TYPE daq_data_t = STRUCTURE count: INTEGER dataval: INTEGER ENDSTRUCTURE VAR status: INTEGER pipestat: INTEGER numbytes: INTEGER datavar: daq_data_t BEGIN -- register 10KB pipe 2 in DRAM as kldaq.dat DAQ_REGPIPE(2, DAQ_DRAM, 100, ’’, ’datavar’, & ’kldaq.dat’, 1, status) IF status<>0 THEN POST_ERR(status,‘ ‘,0,er_abort) ENDIF -- use DAQ_CHECKP to monitor status of pipe DAQ_CHECKP(2, pipestat, numbytes) datavar.count = 0 WHILE (pipestat AND DAQ_PIPREG) > 0 DO -- do while registered -- update data variable datavar.count = datavar.count + 1 datavar.dataval = $FAST_CLOCK -- check if pipe is active IF (pipestat AND DAQ_ACTIVE) > 0 THEN -- write to pipe DAQ_WRITE(2, ’’, datavar, status) IF status<>0 THEN POST_ERR(status,‘ ‘,0,er_abort) ENDIF ENDIF -- put in delay to reduce loading DELAY(200) DAQ_CHECKP(2, pipestat, numbytes) ENDWHILE END DAQWRITE DAQ_STOP Built-In Description Stop an active KAREL pipe. Syntax DAQ_STOP(pipe_num, force_off, status) Input/Output Parameters: [in] pipe_num :INTEGER [in] force_off :BOOLEAN [out] status :INTEGER Remarks pipe_num – The number of the pipe (1 – 5) to be stopped. force_off – If set TRUE, force the pipe to be turned off, even if another application made a start request on the pipe. If set FALSE and if all start requests have been accounted for with stop requests then the pipe is turned off; otherwise it remains on. status - The status of the attempted operation. If not 0, then an error occurred and the pipe was not stopped. The start/stop mechanism on each pipe works on a reference count: The pipe is started on the first start request, and each subsequent start request is counted. If a stop request is received for the pipe, the count is decremented. If the pipe is not forced off, and the count is not zero, the pipe stays on. By setting the force_off flag to TRUE, the pipe is turned off regardless of the count. The count is reset. FRCPipe.StopMonitor method issued by a PC application is equivalent to a call to DAQ_STOP. See Also: Data Acquisition KAREL Built-Ins DAQ_START Built-In FRCPipe.StopMonitor Method Example Refer to the PIPONOFF example in the built–in function DAQ_START. DAQ_UNREG Built-In Description Unregister a previously-registered KAREL pipe, so that it may be used for other data. Syntax DAQ_UNREG(pipe_num, status) Input/Output Parameters: [in] pipe_num :INTEGER [out] status :INTEGER Remarks pipe_num – The number of the pipe (1 – 5) to be unregistered. status - The status of the attempted operation. If not 0, then an error occurred and the pipe was not unregistered. Unregistering a pipe allows the pipe to be re-configured for a different data size, pipe size, pipe name, etc. You must unregister the pipe before re-registering using DAQ_REGPIPE. Good coordination between the KAREL task and the PC application must be maintained to ensure that data is not lost when the pipe is unregistered. The FRCPipe_Unregister event is raised immediately and it disables any subsequent FRCPipe_Receive events. If there are still data records in the network queues from this pipe, they will be discarded. See Also: Data Acquisition KAREL Built-Ins DAQ_REGPIPE Built-In FRCPipes_Unregister Event FRCPipe_Unregister Event Example The following example unregisters KAREL pipe 1. PROGRAM DAQUNREG %ENVIRONMENT DAQ CONST er_abort = 2 VAR status: INTEGER BEGIN -- unregister pipe 1 DAQ_UNREG(1, status) IF status<>0 THEN POST_ERR(status,‘ ‘,0,er_abort) ENDIF END DAQUNREG TPP Macros Send Data() Macro The Send Data macro is used to send up to seven values to a PC application that is waiting for the event. The request code tells the PC application what data is being sent and what the PC is supposed to do with it. Table 1-2 lists and describes the Send Data macro Send Data Macro Description MACRO ITEM DESCRIPTION Syntax: Send Data(request_code, wait_sw, status_reg, val1[,val2[,val3[,val4[,val5[,val6[,val7]]]]]]) Parameters: request_code - This item determines which event is triggered on the PC. It can be a value between 0 and 255. Wait_sw - This item is a wait switch. Valid values are either 0 or 1. If 0, don’t wait for an answer form the PC. If 1, wait for an answer from the PC. See Satisfying the Send Macro Wait_sw. The default value of wait_sw is 0. Status_reg - This item is a register which stores the value of either the answer or the error status for which the teach pendant program is waiting. Valid values are either 0 or a register number. If 0, no register is used, and no answer from the PC is reported back to the teach pendant program. If wait_sw = 1, then the teach pendant program waits for the PC to answer, but the answer value is not placed into a teach pendant register. If an error occurs in the macro, the teach pendant program is aborted. If status_reg is not 0, this is the register number used to report the PC’s answer or error status to the calling teach pendant program. If wait_sw = 0, the teach pendant program will not wait for the PC to answer and the register will only be used to report errors. R[number] is set to 9999 if an error occurs. The default value of status_reg is 0. This parameter is optional. Val1 through Val7 - These items are data that are sent to the PC. Valid items are: INTEGER constants, REAL constants, the values of registers, and STRING constants. At least one value must be sent, but the others are optional. If no data is to be sent, use the Send Event( ) macro instead. See Also Error! Hyperlink reference not valid. FRCPacketEvent Object Overview FRCRobot.CreatePacketEvent Method Example teach pendant program that uses the Send Data macro. PROG TEST1 1: ! Send Event 42 and Data 2: ! No Answer from PC 3: Send Data(42,0,0,’PARTS_ITEM3’,R[1],5,6,7,’TOOL_ITEM1’) PROG TEST2 1: ! Send Event 9 2: ! Wait for PC Answer 3: ! Answer in R[3] 4: Send Data(9,1,3,’TOOLING’,R[1],5,’TEST’) 5: IF R[3]<9999,JMP BLB[10] 6: ! Error in macro 7: ! 8: LBL[10] Using FTP Starting an Internet Session An Internet session handle is the first thing required before any FTP operations can be performed. The connection can be made directly, through a proxy, or using a registry configuration. Typically, the connection is made directly. If the session is created, the function will return a session ID number. Example – Starting an Internet Session 'Declare the InternetOpen() Function Declare Function InternetOpenA Lib "wininet.dll" _ (ByVal lpszCallerName As String, _ ByVal dwAccessType As Long, _ ByVal lpszProxyName As String, _ ByVal nProxyPort As String, _ ByVal dwFlags As Long) As Long 'Access types for InternetOpen() Public Const INTERNET_OPEN_TYPE_PRECONFIG As Long = 0 'use reg config Public Const INTERNET_OPEN_TYPE_DIRECT As Long = 1 'direct to net Public Const INTERNET_OPEN_TYPE_PROXY As Long = 3 'via named proxy Public Const INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY = 4 'prevent using ‘java/script/INS '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Function: FTPStart ' ' Purpose: Start an FTP session, can be local or through gateway ' ' Inputs: vlngAccessType Type of access to request ' vstrProxy Name of Proxy server ' vstrProxyBy Proxy server bypass list ' ' Outputs: rlngSession Handle to the FTP session ' ' Returns: Success or error for calling application to trap ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Public Function FTPStart(ByVal vlngAccessType As Long, _ ByVal vstrProxy As String, _ ByVal vstrProxyBy As String, _ ByRef rlngSession As Long) As Integer 'Default to success for return value FTPStart = mintSUCCESSFUL_C 'cannot pass an empty string as will attempt to connect to empty string ' as proxy server set to NULL instead If vstrProxy = "" Then vstrProxy = vbNullChar End If If vstrProxyBy = "" Then vstrProxyBy = vbNullChar End If 'open the specified Internet Access Type 'these constants come from the Wininet API (wininet.h) 'Note: We are only dealing with the FTP portion of the Wininet functions Select Case vlngAccessType Case INTERNET_OPEN_TYPE_PRECONFIG: rlngSession = InternetOpenA(App.EXEName, _ INTERNET_OPEN_TYPE_PRECONFIG, _ vstrProxy, _ vstrProxyBy, 0) Case INTERNET_OPEN_TYPE_DIRECT: rlngSession = InternetOpenA(App.EXEName, _ INTERNET_OPEN_TYPE_DIRECT, _ vbNullChar, _ vbNullChar, 0) Case INTERNET_OPEN_TYPE_PROXY: rlngSession = InternetOpenA(App.EXEName, _ INTERNET_OPEN_TYPE_PROXY, _ vstrProxy, _ vstrProxyBy, 0) Case INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY: rlngSession = InternetOpenA(App.EXEName, _ INTERNET_OPEN_TYPE_PRECONFIG_WITH_NO_AUTOPROXY, _ vstrProxy, _ vstrProxyBy, 0) Case Else: 'default to direct connection type for FTP rlngSession = InternetOpenA(App.EXEName, _ INTERNET_OPEN_TYPE_DIRECT, _ vbNullChar, _ vbNullChar, 0) End Select FTPStart = mintSUCCESSFUL_C End Function Reading a File Directory into a Collection Reading a directory into a collection involves using two WININET.DLL function calls. The first finds the first file in the directory and returns its information as well as a file find handle. The second one finds the next file based off of the previous file find function. At the end of the routine, the find handle that is returned by the "find first file" function call must be closed. Because the data is returned with extra spaces and extraneous data, a function was written to remove the extra spaces and data. Example – Reading a Directory into a Collection Const MAX_PATH = 260 Type WIN32_FIND_DATA dwFileAttributes As Long ftCreationTime As FILETIME ftLastAccessTime As FILETIME ftLastWriteTime As FILETIME nFileSizeHigh As Long nFileSizeLow As Long dwReserved0 As Long dwReserved1 As Long cFileName As String * MAX_PATH cAlternate As String * 14 End Type Declare Function InternetFindNextFileA Lib "wininet.dll" _ (ByVal hFind As Long, _ ByRef lpFindFile As WIN32_FIND_DATA) As Boolean Declare Function FtpFindFirstFileA Lib "wininet.dll" _ (ByVal hFtpSession As Long, _ ByVal lpszSearch As String, _ ByRef lpFindFile As WIN32_FIND_DATA, _ ByVal dwFlags As Long, _ ByVal dwContext As Long) As Long '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Function: FTPDirToCollection ' ' Purpose: Returns directory listing specified by user into a control ' ' Inputs: vlngConnect Connection ID to get directory for ' robjCollName Name of collection to put directory listing ' into ' vstrDirString Directory filter (i.e. *.tp) ' ' Outputs: N/A ' ' Returns: Success or error (raises error for calling application to ' trap) ' '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Public Function FTPDirToCollection(ByVal vlngConnect As Long, _ ByRef robjCollName As Collection, _ ByVal vstrDirString As String) As Integer Dim strLine As String * 261 Dim blnMoreFiles As Boolean Dim hFind As Long Dim intReturnCode As Integer Dim strFileName As String Dim intPosition As Integer Dim udtDirFiles As WIN32_FIND_DATA Dim intCounter As Integer 'default to success for return value FTPDirToCollection = mintSUCCESSFUL_C 'initialize the structure variables udtDirFiles.cFileName = Space(MAX_PATH) udtDirFiles.cAlternate = Space(14) 'attempt to find the first file specified in ldirstring hFind = FtpFindFirstFileA(vlngConnect, vstrDirString, udtDirFiles, 0, 0) 'clear the collection Since collections are reindexed automatically, ' remove the first member on each iteration. For intCounter = 1 To robjCollName.Count robjCollName.Remove 1 Next intCounter 'get an entry from the directory structure strLine = udtDirFiles.cFileName 'Must parse FROM and RAM Disk devices differently 'returns file size and date and pads file name with spaces If InStr(vstrDirString, "fr:\") Or InStr(vstrDirString, "rd:\") Then 'remove the leading fr:\ or rd:\ from the string strLine = Mid(strLine, 5, Len(strLine)) 'chop off the file size and date intPosition = InStr(1, strLine, ".") + 2 Else ' Get intPositionition Of Next Space intPosition = InStr(1, strLine, vbNullChar) – 1 End If 'if something found then process it If intPosition >= 1 Then strFileName = Left(strLine, intPosition) RemoveSpaces strFileName If (strFileName <> "klevaxdf.vr") _ And (strFileName <> "-bckedt-.tp") Then 'this is the parsed filename (put into control) robjCollName.Add strFileName End If End If 'while there are more file in the directory, add them to the list blnMoreFiles = True Do While blnMoreFiles = True If (InternetFindNextFileA(hFind, udtDirFiles) = False) Then If (GetLastError() = ERROR_NO_MORE_FILES) Then blnMoreFiles = False Else FTPDirToCollection = GetLastError() 'raise error back to calling application Err.Raise mintFTP_DIRECTORY_ERR_C + vbObjectError, App.EXEName, _ "Error locating any " & vstrDirString & _ " files [FTPDirToCollection]." Exit Function End If Else 'get the next entry from the directory structure strLine = udtDirFiles.cFileName If InStr(vstrDirString, "fr:\") Or InStr(vstrDirString, "rd:\") Then 'remove the leading fr:\ or rd:\ from the string strLine = Mid(strLine, 5, Len(strLine)) 'chop off the file size and date intPosition = InStr(1, strLine, ".") + 2 Else ' Get intPositionition Of Next Space intPosition = InStr(1, strLine, vbNullChar) - 1 End If 'if something found then process it If intPosition >= 1 Then strFileName = Left(strLine, intPosition) RemoveSpaces strFileName If (strFileName <> "klevaxdf.vr") _ And (strFileName <> "-bckedt-.tp") Then 'this is the parsed filename (put into control) robjCollName.Add Left(strFileName, intPosition) End If End If End If Loop InternetCloseHandle hFind FTPDirToCollection = mintSUCCESSFUL_C End Function '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Function: RemoveSpaces ' ' Purpose: Removes spaces from a passed in string ' ' Inputs: rstrString String that may contain a space ' ' Outputs: rstrString String with no space ' ' Returns: Success or error (raises error for calling application to ' trap) ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' Private Sub RemoveSpaces(ByRef rstrString As String) Dim intPosition As Integer Dim strTempString As String, strTempString2 As String Dim strLine As String 'no error handling is required by this routine strLine = rstrString 'find 1st space in string intPosition = InStr(1, strLine, Chr$(32)) 'if found remove space If intPosition > 1 Then strTempString = Left(strLine, intPosition - 1) strTempString2 = Right(strLine, 3) strLine = strTempString & strTempString2 End If 'set return value for calling function rstrString = strLine End Sub Legacy Support Robot Manager Overview Managing Connections Using Persistent Connections Another advantage the Robot Manager provides is the ability to save your connections. Any connection can be saved or deleted from a persistent storage area. Connections can be saved by calling the FRCRobotManagerConnection.Save method. A connection can be removed from the persistent list by calling the FRCRobotManagerConnection.Delete method The FRCRobotManagerConnectiion.IsSaved property can be used to determine whether or not the connection is saved. Note that by calling the Delete method, the connection is only removed from the stored list of connections. It does NOT remove the connection from the internal collection in the Robot Manager. The Load method can be used to load the default saved values for the connection. Below is a brief example using the Save, Delete and Load methods and the IsSaved property. Dim objRobMan As FRCRobotManager Dim objRobManConnections As FRCRobotManagerConnections Dim objRobManConnection As FRCRobotManagerConnection ' Get a copy of the Robot Manager Set objRobMan = New FRCRobotManager ' Get the connections collection Set objRobManConnections = objRobMan.Connections ' Get a connection Set objRobManConnection = objRobManConnections.Item("MyRobot") ' Check if already saved If objRobManConnection.IsSaved Then ' Ask the user if they wish to delete the connection If MsgBox("Delete the connnection 'MyRobot'?", _ vbYesNo, "Confirm Delete") = vbYes Then 'Delete it from the store list objRobManConnection.Delete Else ' Load the defaults for the connection objRobManConnection.Load End If Else ' Is not Saved so Save it to the store list objRobManConnection.Save End If Connecting to the Controller the most important feature of the Robot Manager is to get a Robot Server object and connect it to an R-J3 controller. The Robot Server provides the ability to have NoWait (asynchronous) connects to the controller. This concept allows you to tell the Robot Server to connect, and it will return from the call immediately instead of waiting for a successful connection. The Robot Manager uses this feature of the Robot Server. For more detail see the Connecting to an R-J3 Controller and the FRCRobot.ConnectEx method. With a NoWait connect, the connection process has two steps. The steps are initiating the connection, and waiting for a success notification. To initiate a connection using the Robot Manager you simply need to call the FRCRobotManagerConnection.Connect method. This method will return an FRCRobot object. However, the Robot Server may or may not be connected at this point. The second step is to check if the Robot Server is connected. There are two ways to do this. The preferred way is to check the FRCRobotManagerConnection.ConnectionStatus property.If the value is frRMRobotConnected then the Robot Server is connected. The other way is to check the FRCRobot.IsConnected property. This way is less preferred than the first as the Robot Manager will usually be the first to detect any connection problems, therefore will have the most updated information. If the Robot Server is not already connected, you must wait for a notification that the connection has been made. You can receive this notification by subscribing to the FRCRobotManagerConnection_StatusChange event. Then when the Robot Server connects this event will be fired supplying you with the new status. When the status changes to frRMRobotConnected the Robot Server is connected and ready for use. Below is an example of how to complete a connection to an R-J3 controller using the Robot Manager. Private WithEvents mobjRobManConnection As _ FRCRobotManagerConnection Private mobjRobot As FRCRobot Private mblnConnected As Boolean Private Sub subInitialize() Dim objRobMan As FRCRobotManager Dim objRobManConnections As FRCRobotManagerConnections Dim objRobManConnection As FRCRobotManagerConnection ' Get a copy of the Robot Manager Set objRobMan = New FRCRobotManager ' Get the connections collection Set objRobManConnections = objRobMan.Connections ' Get a connection Set objRobManConnection = objRobManConnections.Item("MyRobot") ' Set the Connect to try forever objRobManConnection.ConnectNumRetries = 0 ' Set up to try to Connect every 30 seconds objRobManConnection.ConnectPeriod = 30 ' Initiate the Robot connection Set mobjRobot = objRobManConnection.Connect End Sub Private Sub subMain() ' Start robot connection subInitialize ' Do some work while we wait for a connection subDoBackgroundWork ' We are done with everything so check ' if Robot Server is connected If Not mblnConnected And _ Not (mobjRobManConnection.ConnectionStatus = _ frRMRobotConnected) Then ' Loop till done Do While Not mblnConnected ' Wait 50 ms Sleep (50) Loop End If End Sub Private Sub mobjRobManConnection_StatusChange(ByVal _ NewStatus As Long) If NewStatus = frRMRobotConnected Then mblnConnected = True End If End Sub Special Features Using HeartBeat The HeartBeat feature of the Robot Manager allows applications to check the connection between the R-J3 controller and the PC that the Robot Manager resides periodically. This allows the application to update the status of the connection periodically. The FRCRobotManagerConnection.HeartBeat property is used to setup the HeartBeat feature. . HeartBeat Used to enable/disable the HeartBeat feature. Must be greater or equal to zero. If zero, the HeartBeat feature is disabled. If greater than zero, the value is the period at which the HeartBeat feature checks the connection. Units are in seconds. Use the FRCRobotManagerConnection.ConnectionStatus property and the FRCRobotManagerConnection_StatusChange event to monitor the current connection status. The HeartBeat feature will change the status values between frRMRobotAvailable and frRMRobotUnAvailable if no Robot Server is connected. If a Robot Server is connected and the HeartBeat feature detects a bad connection to the R-J 3 controller, it will force the Robot Server to disconnect. This will cause the appropriate status changes. The following is an example on how to set up the HeartBeat feature. Dim objRobMan As FRCRobotManager Dim objRobManConnections As FRCRobotManagerConnections Dim objRobManConnection As FRCRobotManagerConnection ' Get a copy of the Robot Manager Set objRobMan = New FRCRobotManager ' Get the connections collection Set objRobManConnections = objRobMan.Connections ' Get a connection Set objRobManConnection = objRobManConnections.Item("MyRobot") ' Set the HeartBeat to check connection every 30 seconds objRobManConnection.HeartBeat = 30 ' Get a different connection Set objRobManConnection = objRobManConnections.Item("MyOtherRobot") ' Disable this connections HeartBeat objRobManConnection.HeartBeat = 0 Robot Manager Object Interface RobotManager FRCRobotManager FRCRobotManager Object Overview Description The FRCRobotManager object is the parent object of the Robot Server Connection Manager server. This object provides access to the list of connections and status change events. Properties Connections as FRCRobotManagerConnections (read-only) Methods None. Events None. FRERobotManagerErrors FRERobotManagerErrors Overview Description The object provides an enumerated list to represent the different errors that can occur while using the Robot Manager. Overview Use these constants to decode the error number that is raised by the Robot Manager. Values frRMCannotDeleteRegistry frRMCannotOpenRegistry frRMCannotReadRegistry frRMCannotWriteRegistry frRMConcurrentConnects frRMConnectionNotFound frRMConnectionNotSaved frRMDuplicateRobotName frRMValueOutOfRange frRMInvalidIndex frRMCannotWriteRegistry Description The Robot Manager could not write a key/value to the system Registry. Resolution Make sure your Windows User account has sufficient permissions to complete the operation. See Also FRERobotManagerErrors Overview FRCRobotManagerConnection.Delete Method FRCRobotManagerConnection.Load Method Connections FRCRobotManagerConnections FRCRobotManagerConnections Properties FRCRobotManagerConnections.Item Property Description Returns the specified FRCRobotManagerConnection object from the FRCRobotManagerConnections collection. Syntax [objNewConnection =] objConnections.Item(strRobotName) OR [objNewConnection =] objConnections.Item(strRobotName, _ enuConnectionType) OR [objNewConnection =] objConnections.Item(,,lngIndex) Parts objConnections as FRCRobotManagerConnections objNewConnection as FRCRobotManagerConnection strRobotName as String enuConnectionType as FRERobotManagerConnectionTypes lngIndex as Long Remarks To specify the item that is desired, several combinations of parameters can be used. RobotName – Can be used by itself or in combination with Connection Type. This is the user-friendly robot name specified in the Add method. ConnectionType – Must be used in combination with RobotName. This parameter is only needed when a RobotName is shared between more than one connection type. Index – Must be used alone. Returns the FRCRobotManagerConnection object at the specified index within the collection. If an invalid parameter is given, an exception will be raised. See Also FRCRobotManagerConnections Object Overview FRCRobotManagerConnection Object Overview Example Dim objRobMan As FRCRobotManager Dim objRobManConnections As FRCRobotManagerConnections Dim objRobManConnection As FRCRobotManagerConnection ' Get a copy of the Robot Manager Set objRobMan = New FRCRobotManager ' Get the connections collection Set objRobManConnections = objRobMan.Connections ' Get a connection Set objRobManConnection = _ objRobManConnections.Item("MyRobot") ' Get a connection by index Set objRobManConnection = objRobManConnections.Item(, , 1) ' or Set objRobManConnection = _ objRobManConnections.Item(Index:=1) FRCRobotManagerConnection FRCRobotMangerConnection Properties FRCRobotManagerConnection.HostName Property Description Returns the domain name for the RJ-3 controller that the connection represents. Syntax [strHostName = ]objRobotOnlineController.HostName Parts objRobotOnlineController as FRCRobotManagerOnlineController strHostName as String Remarks None. See Also FRCRobotManagerConnection Object Overview FRCRobot.ConnectEx Method FRCRobotManagerConnections.AddOnline Method Example Dim objRobMan As FRCRobotManager Dim objRobManConnections As FRCRobotManagerConnections Dim objRobManConnection As FRCRobotManagerConnection ' Get a copy of the Robot Manager Set objRobMan = New FRCRobotManager ' Get the connections collection Set objRobManConnections = objRobMan.Connections ' Get a connection Set objRobManConnection = _ objRobManConnections.Item("MyRobot") ' Get the host name of the controller MsgBox "The controllers host name is: " & _ objRobManConnection.HostName FRCRobotManagerConnection.IsSaved Property Description Returns a boolean value signifying whether or not the connection parameters have been saved. Syntax [blnIsSaved] = objRobotConnection.IsSaved Parts objRobotConnection as FRCRobotManagerConnection blnIsSaved as Boolean Remarks If this property returns True, the connection settings have been saved. Otherwise, the connection settings are not present in the saved connection list. This information is stored in the Microsoft System Registry. Saved connections are restored when the Robot Manager is first instantiated. See Also FRCRobotManagerConnection Object Overview FRCRobotManagerConnection.Save Method Example Dim objRobMan As FRCRobotManager Dim objRobManConnections As FRCRobotManagerConnections Dim objRobManConnection As FRCRobotManagerConnection ' Get a copy of the Robot Manager Set objRobMan = New FRCRobotManager ' Get the connections collection Set objRobManConnections = objRobMan.Connections ' Get a connection Set objRobManConnection = _ objRobManConnections.Item("MyRobot") ' Check is connection is saved If objRobManConnection.IsSaved Then MsgBox "The connection is saved" Else MsgBox "The connection is not saved" End If FRCRobotMangerConnection Methods FRCRobotManagerConnection.Delete Method Description Removes the connection data from the system Registry. Syntax objRMConnection.Delete() Parts objRMConnection as FRCRobotManagerConnection Remarks This information is stored in the Microsoft system Registry. Saved connections are restored when the Robot Manager is first instantiated. By deleting the connection from the system Registry, the Robot Manager will no longer load the connection on start up. This method will succeed if the connection is not stored in the Registry. See Also FRCRobotManagerConnection Object Overview FRCRobotManagerConnection.Save Method Example Dim objRobMan As FRCRobotManager Dim objRobManConnections As FRCRobotManagerConnections Dim objRobManConnection As FRCRobotManagerConnection ' Get a copy of the Robot Manager Set objRobMan = New FRCRobotManager ' Get the connections collection Set objRobManConnections = objRobMan.Connections ' Get a connection Set objRobManConnection = _ objRobManConnections.Item("MyRobot") ' Check if already saved If objRobManConnection.IsSaved Then ' Ask the user if they wish to delete the connection If MsgBox("Do you wish to delete the connnection 'MyRobot'?", _ vbYesNo, "Confirm Delete") = vbYes Then ‘ Delete it from the store list objRobManConnection.Delete Else ' Load the defaults for the connection objRobManConnection.Load End If Else ' Is not Saved so Save it to the store list objRobManConnection.Save End If FRCRobotMangerConnection Events FRCRobotManagerConnection_Change Event Description Occurs when a change in a connections property is detected. Syntax objRobMan_Change(lngProp, varNewValue) Parts objRobMan as FRCRobotManager lngProp as FRERobotManagerConnectionProperties varNewValue as Variant Remarks This event allows clients to monitor specific properties for changes. An enumerated value representing the changed property and the value of the property will be sent with the event. Client applications must synchronize the setting/resetting of properties values, otherwise a run away loop can result. See Also FRCRobotManagerConnection Object Overview FRERobotManagerConnectionProperties Overview Example Private WithEvents mobjRobManConnection As _ FRCRobotManagerConnection Private Sub mobjRobManConnection_Change(Property _ As FRERobotManagerConnectionProperties, _ NewValue As Variant) Select Case Property Case frRMCAutoReconnectEnable MsgBox "AutoReconnectEnable has changed to: " & _ CStr(NewValue) Case frRMCAutoReconnectPeriod MsgBox "AutoReconnectPeriod has changed to: " & _ CStr(NewValue) Case frRMCAutoReconnectNumRetries MsgBox "AutoReconnectNumRetries has changed to: " _ & CStr(NewValue) Case frRMCConnectPeriod MsgBox "ConnectPeriod has changed to: " & _ CStr(NewValue) Case frRMCConnectNumRetries MsgBox "ConnectNumRetries has changed to: " & _ CStr(NewValue) Case frRMCKeepAlive MsgBox "KeepAlive has changed to: " & CStr(NewValue) Case frRMCHeartBeat MsgBox "HeartBeat has changed to: " & CStr(NewValue) Case frRMCIsSaved MsgBox "IsSaved has changed to: " & CStr(NewValue) End Select End Sub FRCRobotManagerConnection_StatusChange Event Description Occurs when a change in a connections status is detected. Syntax objRobMan_StatusChange(lngNewStatus) Parts objRobMan as FRCRobotManager lngNewStatus as FRERobotManagerConnectionStatus Remarks This event will be fired in conjunction with the StatusChange event on the FRCRobotManager object. The new status will be passed with the event. See Also FRCRobotManagerConnection Object Overview FRERobotManagerConnectionStatus Overview FRCRobotManagerConnections_StatusChange Event Example Private WithEvents mobjRobManConnection As _ FRCRobotManagerConnection Private Sub mobjRobManConnection_StatusChange(ByVal _ NewStatus As FRERobotManagerConnectionStatus) Select Case NewStatus Case frRMRobotAvailable MsgBox "Robot Available" Case frRMRobotUnavailable MsgBox "Robot UnAvailable" Case frRMRobotConnected MsgBox "Robot Connected" Case frRMConnecting MsgBox "Robot Connecting" Case frRMDisconnecting MsgBox "Robot Disconnected" Case frRMAutoReconnecting MsgBox "Robot AutoReconnecting" End Select End Sub FRERobotManagerConnectionProperties FRERobotManagerConnectionProperties Overview Description An enumeration of constants used to represent the properties of the FRCRobotManagerConnection object. Overview These constants are used as parameters when a FRCRobotManagerConnection_Change event is triggered. Values frRMCAutoReconnectEnable frRMCAutoReconnectNumRetries frRMCAutoReconnectPeriod frRMCConnectNumRetries frRMCConnectPeriod frRMCHeartBeat frRMCIsSaved frRMCKeepAlive See Also FRCRobotManagerConnection.AutoReconnectEnable Property FRCRobotManagerConnection.AutoReconnectNumRetries Property FRCRobotManagerConnection.AutoReconnectPeriod PropertyFRCRobotManagerConnection.ConnectNumRetries PropertyFRCRobotManagerConnection.ConnectPeriod PropertyFRCRobotManagerConnection.Heartbeat PropertyFRCRobotManagerConnection.IsSaved PropertyFRCRobotManagerConnection.KeepAlive PropertyFRCRobotManagerConnection.Change Event Limitations FRCAxesCollection is not updated when extended axes added Symptom Create a TP program on a six-axis robot. Record a TP Position. Save the TP program. Now load the TP program on a nine-axis robot. Look at the Position. ie )make sure the AxesCollection object is created. Record the existing TP Position. The type will change from frXyzWpr to frExtXyzWpr, but the AxesCollection is not updated. The data is correct on the controller, however, it is not reflected properly in the object. Avoidance Record the TP position before creating the AxesCollection or disconnect the Robot Server and reconnect. Problems loading invisible programs over visible & vice versa Symptom When an invisible program overwrites a visible program, there is no delete event; when a visible program overwrites an invisible one, there is no create event. The Invisible property will change appropriately in both cases, but the program doesn't change. So when an invisible program is loaded over a visible, it's still in the collection but its Invisible property is true, and vice-versa. Other events, such as the program object's Refresh will occur as expected. Avoidance Always use unique names for visible and invisible programs Index D DAQ_STOP Built-In 219 F FRCAlarm.CauseMessage Property 101 FRCAlarm.ErrorClass Property 102 FRCAlarm.ErrorFacility Property 103 FRCAlarm.ErrorMnemonic Property 104 FRCAlarm.ErrorSeverity Property 104 FRCAlarms.Item Property 105 FRCAlarms.Max Property 105 FRCAlarms.Reset Method 106 FRCAnalogIOType Object Overview 139 FRCAnalogIOType.CanConfigure Property 139 FRCAnalogIOType.CanSimulate Property 140 FRCApplications Object Overview 176 FRCApplications.Count Property 177 FRCApplications.Item Property 177 FRCApplications.Remove Method 178 FRCAxesCollection is not updated when extended axes added 241 FRCAxesCollection.Item Property 69 FRCCommonAssoc Object Overview 48 FRCConfig.Left Property 71 FRCCurGroupPosition Object Overview 71 FRCCurGroupPosition.Parent Property 72 FRCCurPosition.Group Property 73 FRCCurPosition.StopMonitor Method 74 FRCDigitalIOType.CanConfigure Property 140 FRCDigitalIOType.CanSimulate Property 141 FRCFlag.CanComplement Property 142 FRCFlag.CanConfigure Property 143 FRCFlag.CanSimulate Property 143 FRCFlagSignal Object Overview 124 FRCGroupIOType.CanComplement Property 144 FRCGroupIOType.CanConfigure Property 144 FRCGroupIOType.CanSimulate Property 145 FRCGroupPosition Object Overview 75 FRCGroupPosition.Parent Property 76 FRCIndGroupPosition Object Overview 76 FRCIndGroupPosition.Parent Property 78 FRCIndPosition.Unitialize Method 78 FRCIOConfig.FirstLogicalNum Property 110 FRCIOConfig_Delete Event 111 FRCIOConfigs.Item Property 112 FRCIOConfigs_Create Event 113 FRCIOConfigs_Delete Event 114 FRCIOSignal.NoRefresh Property 119 FRCIOSignal.NoUpdate Property 120 FRCIOSignal.StopMonitor Method 122 FRCIOSignal_Change Event 123 FRCIOSignal_Delete Event 123 FRCIOSignals.Refresh Method 138 FRCIOSignals.StopMonitor Method 138 FRCJoint.Item Property 79 FRCLaserAnalogIOSignal.Simulate Property 125 FRCLaserAnalogIOType Object Overview 145 FRCLaserAnalogIOType.CanConfigure Property 146 FRCLaserAnalogIOType.CanSimulate Property 146 FRCLaserDigitalIOType.CanConfigure Property 148 FRCLaserDigitalIOType.CanSimulate Property 148 FRCMarkerType.CanConfigure Property 149 FRCMarkerType.CanSimulateProperty 149 FRCMotionErrorInfo Object Overview 80 FRCPipe.StopMonitor Method 167 FRCPipeField Object Overview 170 FRCPipeFields.Count Property 168 FRCPipeFields.VarName Property 169 FRCPipes.Count Property 166 FRCPipes.Item Property 166 FRCPipes_Register Event 167 FRCPLCIOSignal Object Overview 126 FRCPLCIOSignal.Value Property 128 FRCPosition.IsMonitoring Property 81 FRCPosition.IsReachable Property 82 FRCPosition.StartMonitor Method 85 FRCPosition.StopMonitor Method 86 FRCPosition.Uninitialize Method 87 FRCPosition.UserTool Property 83 FRCProgram.IgnoreAbort Property 21 FRCProgram.IgnorePause Property 21 FRCProgram.StackSize Property 22 FRCProgram.TimeSlice Property 22 FRCProgram.Variables Property 23 FRCProgram_RefreshVars Event 23 FRCPrograms Object Overview 24 FRCPrograms.Item Property 25 FRCPrograms.Selected Property 27 FRCPrograms_AttrChange Event 28 FRCPrograms_RefreshVars Event 28 FRCPrograms_SubTypeChange Event 29 FRCRegNumeric.Parent Property 49 FRCRegNumeric.RegLong Property 49 FRCRegString.Comment Property 50 FRCRegString.Parent Property 51 FRCRegString.Value Property 51 FRCRNRDMResponses.DoScan Method 201 FRCRNRDMResponses.Item Property 200 FRCRNRobot.HeartbeatEnable Property 196 FRCRNRobot.HeartBeatPeriodProperty 197 FRCRNRobot.KeepAliveDurationProperty 197 FRCRNRobots.Item Property 195 FRCRNRobots.Name Property 195 FRCRNServices.Count Property 201 FRCRNServices.Item Property 202 FRCRobot.IOTypes Property 11 FRCRobot.Language Property 12 FRCRobot.Programs Property 13 FRCRobotIOType Object Overview 150 FRCRobotIOType.CanConfigure Property 152 FRCRobotIOType.CanSimulate Property 152 FRCRobotManagerConnection HostName 236 FRCRobotManagerConnection IsSaved 237 FRCRobotManagerConnections Item 235 FRCRobotNeighborhood.DefaultAutoReconnectNumRetrie s Property 193 FRCRobotNeighborhood.StartModeAutoDelay Property 193 FRCRobotNeighborhood.VirtualRestartTolerance Property 194 FRCScatteredAccess Refresh Method 173 FRCScatteredAccess Update Method 175 FRCSOPIOSignal.Value Property 129 FRCSOPIOType.CanConfigure Property 153 FRCSOPIOType.CanSimulate Property 154 FRCSynchData.Features Property 180 FRCSysGroupPosition.Parent Property 89 FRCSysInfo.Clock Property 180 FRCSysInfo.CMOS Property 181 FRCSysInfo.DRAM Property 181 FRCSysInfo.FROM Property 182 FRCSysInfo.PermMemUsed Property 185 FRCSysInfo.SystemMemUsed Property 186 FRCSysInfo.TempMemUsed Property 187 FRCSysInfo.TPPMemFree Property 188 FRCSysInfo.TPPMemLargestFreeBlock Property 189 FRCSysInfo.TPPMemUsed Property 190 FRCSysPosition.Uninitialize Method 91 FRCSysPosition_Change Event 91 FRCSysPosition_CommentChange Event 92 FRCSysPositions.Count Property 93 FRCSysPositions.Item Property 93 FRCSysPositions.Selected Property 94 FRCSysPositions_Change Event 95 FRCTask.CurProgram Property 34 FRCTask.CurRoutine Property 35 FRCTask.ProgramType Property 36 FRCTask.StepType Property 37 FRCTask.SystemTask Property 37 FRCTask.TimeSlice Property 38 FRCTask.TopProgram Property 38 FRCTask.TraceEnable Property 39 FRCTask.TraceLength Property 39 FRCTasks.Count Property 40 FRCTasks.IsMonitoring Property 40 FRCTasks.StopMonitor Method 41 FRCTPIOSignal Object Overview 130 FRCTPIOSignal.Value Property 131 FRCTPIOType.CanComplement Property 154 FRCTPIOType.CanConfigure Property 155 FRCTPIOType.CanSimulate Property 155 FRCTPPosition.IsAtCurPosition Property 96 FRCTPPosition.ReferenceCount Property 96 FRCTPPosition_Change Event 97 FRCTPPositions.Count Property 98 FRCTPPositions.Item Property 98 FRCTPPositions_BeginRenumberAll Event 99 FRCTPProgram_SubTypeChange Event 30 FRCUOPIOSignal.Value Property 133 FRCUOPIOType.CanConfigure Property 157 FRCUOPIOType.CanSimulate Property 157 FRCVar.FieldName Property 52 FRCVar.GroupNum Property 53 FRCVar.IsMonitoring Property 54 FRCVar.MaxStringLen Property 55 FRCVar.NoUpdate Property 55 FRCVar.Program Property 57 FRCVar.StopMonitor Method 59 FRCVar.StorageClass Property 58 FRCVars.IsMonitoring Property 61 FRCVars.NoUpdate Property 61 FRCVars.Program Property 62 FRCVars.Update Method 64 FRCVars_Rename Event 65 FRCWeldDigitalIOType Object Overview 160 FRCWeldDigitalIOType.CanConfigure Property 161 FRCWeldDigitalIOType.CanSimulate Property 161 FRCWeldStickIOSignal Object Overview 136 FRCWeldStickIOType Object Overview 158 FRCWeldStickIOType.CanConfigure Property 159 FRCWeldStickIOType.CanSimulate Property 159 FREAlarmSeverityConstants Overview 106 FREProgramTypeConstants Overview 32 FREProtectionConstants Overview 32 FRERejectModeConstants Overview 32 FRERobotManagerConnectionProperties Overview 241 frErrorReset 107 FREStartModeConstants Overview 190 frExecuteNormBwd 42 frFrenchLanguage 14 frHoldAMRPkt 42 frHoldChgExe 42 frHoldFailLk 42 frHoldMoDone 43 frHoldMoStrt 43 frHoldUAMRPkt 43 frHoldUnlock 43 frHoldUnwait 43 frHoldVBltin 44 frIgnorePauseAttr 30 frInvalidDateTime 17 frInvVarName 17 frInvVarType 18 frInvVectIndex 18 frPacketEventInvSSC 19 frPacketEventNoSuchItem 19 frPipeCantCreateMonitor 20 frPipeInvalidFieldIndex 20 frPipeInvalidFieldName 20 frProgInvalidParam 17 frProgramNotLoaded 17 frRMCannotWriteRegistry 235 frRNRDMDNSFlag 207 frRNRDMEGDFlag 207 frRNRDMEIPFlag 207 frRNRDMFTPFlag 208 frRNRDMProfiSFlag 208 frRNRDMServiceID 206 frRNVirtualFatalErrorDuringRecovery 204 frRNVirtualVersionNotSupported 205 frSevExMask 108 frSevExNone 108 frSevPause 109 frSevServo 109 frSevStopL 109 frSSC_Wild 165 frStandardSave 20 frStepTPMotion 44 frTaskAttrCircMotion 44 frTaskAttrERPrgName 44 frTaskAttrNumChild 45 frTaskAttrParenNum 45 frTaskAttrPauseOnShift 45 frTaskAttrStkSize 46 frTaskAttrSuperMotion 46 frTaskAttrSystemTask 46 frTaskAttrTaskPri 46 frTaskAttrTaskSt 47 frTaskAttrTCDStatus 47 frTaskAttrTPMotion 47 frTaskAttrTraceEnb 47 frTaskAttrTraceLength 48 frTaskAttrUserTaskID 48 P Problems loading invisible programs over visible & vice versa 242