Hello Guest it is April 16, 2024, 05:38:30 AM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - zach3

Pages: 1
1
I'm running a Mach3 MacroPump script that gets the current time and positions for the x and y axis, and then appends this info to a text file. I need the time resolution to be in milliseconds, but can't find a way to get anything better than seconds with the Cypress Enable functions. Does anyone know a way to do this? It seems like Visual Basic has millisecond formatting for its time fetching functions, but I can't get any of these functions to work in the MacroPump, and Cypress Enable's Time(Now) function that I am currently using doesn't seem to accept any millisecond formatting parameters. Here is my current code for reference:

  Dim t As String                            
  Dim x As Double
  Dim y As Double
  Open "C:\Mach3\macros\Dual_Axis_Test_Stand\timePositionLog.txt" For Append As #1
    t = Time(Now)
    x = GetDRO(0)
    y = GetDRO(1)
    Print #1, t
    Print #1, x
    Print #1, y
  Close #1

Pages: 1