Author Topic: Denso 6 axis robot (VS68) - logging data  (Read 412 times)

0 Members and 1 Guest are viewing this topic.

Offline industrial_eng

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
Denso 6 axis robot (VS68) - logging data
« on: April 30, 2018, 04:35:27 PM »
Does anyone know how to log data from Denso controller?
I have a variable that calculates the execution time of a cycle.
I need to log it to file and then plot it.
I currently use PrintDbg to at least display it, but still don't know how to log custom variable.

Please help with this....
Below is the program that I use




'!TITLE "Cycle time"

Sub Main

   PrintMsg "MSG"
   TakeArm Keep = 0
   
'Variables declaration---------------------------
   
   Dim homePosition As Position
   Dim startPosition As Position
   Dim endPosition As Position

   Dim option As Integer '1 - option 1 / 2 - option 2 / 3 - option 3 ***not used yet
   Dim straightMove As Integer
   Dim verticalTravel As Integer
   Dim horisontalTravel As Integer

   Dim slowSpeed As Integer 'Default: 20
   Dim highSpeed As Integer 'Default: 100
   Dim vertSpeed As Integer 'Default: 50
   Dim vertAccel As Integer 'Default: 100
   Dim vertDecel As Integer 'Default: 100
   Dim horizSpeed As Integer 'Default: 100
   Dim horizAccel As Integer 'Default: 100
   Dim horizDecel As Integer 'Default: 100

   Dim archStart As Integer 'Default: 15
   Dim archEnd As Integer 'Default: 15
   Dim passMotion As Integer 'Default: 0
   Dim highAccuracy As Integer 'Default 1
   Dim elapsedTime As Integer 'Holder for the timers
   Dim tempTime As Integer 'Holder for the temp timers


'Variable initialization-------------------------
   
   'enable/disable variables
   straightMove = 2 '0 - use to set streight motions (MoveS) / 1 - use set of curved motions (Move) / 2 - use arch move / Default:0
   highAccuracy = 1 '0 - HighPathAccuracy = False / 1 - HighPathAccuracy = True

   'numeric settings
   verticalTravel = 25
   horisontalTravel = 300

   slowSpeed = 20
   highSpeed = 100
   vertSpeed = 50
   vertAccel = 100
   vertDecel = 100
   horizSpeed = 100
   horizAccel = 100
   horizDecel = 100

   archStart = 0
   archEnd = 0
   passMotion = -1 'same as @P
   
   homePosition = P( 300, 0 , 300, 180, 0, 180, -1)
   startPosition = P( 300,150, 300, -180, 0, 180, -1)
   endPosition = P( 300,-150, 300, -180, 0, 180, 5)
   

'Move to home positoin----------------
   PrintDbg "Robot Will Move To Home Position"
   Speed slowSpeed
   Move P, homePosition
   Delay 2000
   PrintDbg "Robot Will Move To Cycle Start Position"
   Move P, startPosition
   PrintDbg "Test Parameters: ", " Moves (0-MoveS / 1-Move / 2-arch)", straightMove, " Speed: ", highSpeed, " Horizontal Travel: ", horisontalTravel, " Vertical Travel: ", verticalTravel
   PrintMsg "Test"

   If highAccuracy == 0 Then
         HighPathAccuracy False
   Else
         HighPathAccuracy True
   End If


'Test cycle

   Do
   
   Select Case straightMove

      Case 0 '--------------------------------------option 0 is streight move (default)

         'If highAccuracy == 0 Then
            'HighPathAccuracy False
         'Else
            'HighPathAccuracy True
         'End If


         Speed highSpeed

         tempTime = 0
         elapsedTime = 0
         tempTime = Timer

         Depart L, @[passMotion] verticalTravel, Speed = (vertSpeed, vertAccel, vertDecel)
         Approach L, endPosition, verticalTravel, Speed = (horizSpeed, horizAccel, horizDecel)
         Move L, @[passMotion] endPosition, Speed = (vertSpeed, vertAccel, vertDecel)
         Depart L, @[passMotion] verticalTravel, Speed = (vertSpeed, vertAccel, vertDecel)
         Approach L, startPosition, verticalTravel, Speed = (horizSpeed, horizAccel, horizDecel)
         Move L, @[passMotion] startPosition, Speed = (vertSpeed, vertAccel, vertDecel)

         elapsedTime = Timer - tempTime
         PrintDbg elapsedTime
      
      Case 1 '--------------------------------------option 1 is curved moves

         'If highAccuracy == 0 Then
            'HighPathAccuracy False
         'Else
            'HighPathAccuracy True
         'End If

         Speed highSpeed

         tempTime = 0
         elapsedTime = 0
         tempTime = Timer
      
         Depart P, @[passMotion] verticalTravel
         Approach P, endPosition, verticalTravel
         Move P, @[passMotion] endPosition
         Depart P, @[passMotion] verticalTravel
         Approach P, startPosition, verticalTravel
         Move P, @[passMotion] startPosition
      
         elapsedTime = Timer - tempTime
         PrintDbg elapsedTime


      Case 2 '--------------------------------------option 1 is arch move

         'If highAccuracy == 0 Then
            'HighPathAccuracy False
         'Else
            'HighPathAccuracy True
         'End If
            
         Speed highSpeed
      
         tempTime = 0
         elapsedTime = 0
         tempTime = Timer
      
         ArchMove endPosition, 25, archStart, archEnd
         ArchMove startPosition, 25, archStart, archEnd
      
         elapsedTime = Timer - tempTime
         PrintDbg elapsedTime

      Case Else
      'implement error handling routine


      
   End Select

   Loop While True

   
End Sub

Offline esp400

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 8
Re: Denso 6 axis robot (VS68) - logging data
« Reply #1 on: May 01, 2018, 12:05:10 PM »
I think you might want to use this:

STARTVARLOG (Statement) [Version 2.7 or later]


 

Start a variable log.


 

STARTVARLOG


 

This statement specifies the start of variable logging in programs.
Transmitting the variable log to WINCAPS III allows the log to be browsed.
This statement logs only variables that are added to the Watch list and selected in the Log column in WINCAPS III. (Ver. 2.7 or later)


 

STOPVARLOG, CLEARVARLOG


 

CLEARVARLOG 'Clear variable log data 
STARTVARLOG 'Start a variable log
······ 
In operation 
······ 
STOPVARLOG 'Stop a variable log

Offline industrial_eng

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
Re: Denso 6 axis robot (VS68) - logging data
« Reply #2 on: May 10, 2018, 08:44:07 AM »
Thanks!

...but looks like this command is not available.