Hello Guest it is April 26, 2024, 11:36:00 PM

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 - maxsteak

Pages: 1
1
Hello,

After searching on the web for implementing the QueryPerformanceCounter, the workaround is using currency type. However, I have a type mismatch issue.
Can you please advice how to make it work?

Quote
    Option Explicit
    Private Declare Function QueryPerformanceCounter Lib "kernel32" (lpPerformanceCount As Currency) As Long
    Private Declare Function QueryPerformanceFrequency Lib "kernel32" (lpFrequency As Currency) As Long
    Private Sub Form_Load()
        Dim cTimer As Currency
        Dim cTimer2 As Currency
        Dim Freq As Currency
       
        Dim i As Long
        Dim temp As Double
       
        QueryPerformanceFrequency Freq 'get frequency
        QueryPerformanceCounter cTimer 'get first time
       
       
        'do your stuff here stuff
        For i = 1 To 2000000
            temp = Sqr(i / 20 * (50 Mod i) ^ 3.333)
        Next
       
        QueryPerformanceCounter cTimer2 'get second time
       
        Print Round((cTimer2 - cTimer) / Freq, 5) & "s" 'subtract first from second. then divide by freq.
    End Sub


2
General Mach Discussion / Video can't work
« on: January 20, 2012, 11:29:33 AM »
Hello Sirs,

I tried to connect a webcams that worked well on Windows (tried 7 and XP-SP3) but Mach3 gets the error message VideoOCX (VIDEO) - Decompressor not supported (try 24 bits color depth video format).

I saw another case in this forum that resolve the issue by using USB2 instead of USB1 port. So I tried 2 different computers (I'm sure I'm on USB2), still the same error.

How to resolve this issue?

The webcam is a logitech quick cam pro 9000.

3
General Mach Discussion / coordinate accuracy in position and time
« on: January 12, 2012, 12:48:11 PM »
Hello Forum guys,

I'm wondering how to collect (log of t; x; y; z) the real time coordinates of my axis during a program.

Side question: what's the accuracy of this log of coordinates with timestamp compared to the real position? Any risk of delay and mis-position?

Final question: at which frequency I can log these coordinates?


Thank you in advance for your answers.

4
VB and the development of wizards / sleep issue
« on: November 10, 2011, 11:01:10 AM »
Hello there,

Based on a simple g-code program, I try to transfer it on vb to improve and make a more complex algorithm. However, when running the simple code below, I cannot see the wait time between down/up unless I put >2seconds.
What's wrong in my code?

Global Const nT_Wid = 3
Global Const Dpitch = 10.0

Sub Main()
  Dim i As Integer
  Code "G17 G21 G91 G64 G40"
  For i = 1 To nT_Wid
    Touch
    Code "G0 X" & Dpitch
  Next i
End Sub
Sub Touch
  Code "G1 F1000" Z5"
  Sleep(1000)
  Code "G0 Z5"
End Sub   

Pages: 1