Hello Guest it is April 27, 2024, 06:39:05 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.


Messages - TPS

2391
General Mach Discussion / Re: Toggle output from button input?
« on: March 09, 2015, 10:38:49 AM »
Have you macropump enabled in general config ?
is your macropump macro in the wright folder ?
is your input1 working in diagnostic screen ?

2392
CS-Lab / Re: Csmio/IP-A drives
« on: March 09, 2015, 10:36:48 AM »
Hi,

http://www.cs-lab.eu/en/upload/pdf/User_Manual_CSMIOIPA_1.1_EN.pdf

how to read a specific Input using the GETOEMLED or GETUserLET??

chapter 4.13.3

how I can activate a digital Output??

chapter 4.7.3

if my VFD is +/-10V how I can set it up ??

chapter 4.13.4

come on Ghantos, the CSMIO manuals are realy good.

2393
General Mach Discussion / Re: Toggle output from button input?
« on: March 09, 2015, 08:58:19 AM »
Hi,

don't think its gona work in macropump because you have to create a rising edge of the input.

this may work:

If not IsActive (Input1)  = True Then
  LED = GetOEMLED(78)  ' LED looks at state of Output 5 LED
End If

If IsActive (Input1) And LED = True Then  ' looking at input 1 and LED of Output 5
  DeActivateSignal (OutPut5)
Else
 If IsActive (Input1) And LED = False Then
   ActivateSignal (OutPut5)
 End If
End If







made a small document how it should work, not the easy way, but it's working here.
sorry for the german windows, but you should find them in the english version.

Thomas

2394
General Mach Discussion / Re: new button and led
« on: March 09, 2015, 04:17:48 AM »
Hi,

I think there must be other parts to the code telling the macro what button34 actually is.

Hood

it's not button34.

code 34 in the screendesigner means to do a basic script, with is
in (dont know how to say) this button.

so the led needs to be turned on in ths button script.

Thomas


2395
Brains Development / Re: Brains writing wrong values to DRO's
« on: March 09, 2015, 03:23:11 AM »
Hi Bob,

you asked:
--->How did you arrive at that formula?

ok i try to explain in my bad english:

we have the value from the knob, witch is 0->15
we want a outgoing value from 40->250, so we have a range
of 210.

210/15 = 14, so we multiply the origal value by 14 and add
the 40 for the beginning value, thats it.

Regards Thomas


2396
Brains Development / Re: Brains writing wrong values to DRO's
« on: March 08, 2015, 07:02:36 AM »
Hi Bob,

ok forget about this V0 thing, played a little bit around,
it's not working. the values seam to be only updated
at the end of a brain.

think the protection for under- and oversizing the values need
to be done in macropump macro.

Thomas

2397
Brains Development / Re: Brains writing wrong values to DRO's
« on: March 08, 2015, 05:28:22 AM »
Hi Bob,


for the spindle should something like this work.(modbus adresses must be different)
not sure why you had to delete the two lines with V0

the first one should protect the value to get less than 0
the second one should protect the value to get greather than 250
are you sure your compare was "greater than" and not "less than".

Thomas

2398
Brains Development / Re: Brains writing wrong values to DRO's
« on: March 07, 2015, 04:14:34 AM »
hi Bob,

i am realy not familar with brains, but i wold try to do this in one brain.

Thomas

2399
Mach4 General Discussion / Re: Mach4 Serial Port Support
« on: March 06, 2015, 07:45:52 AM »
Hi,
Would like to use two serial ports and hopefully Mach4 has fixed the Mach3 limitation of 1 serial port.

In Mach3 and VB script you can use more than one serial port:

Sub Main()

 Const MyPort = 1                        ' COM1
 Const MyBaud = "57600"                  ' bps rate
 Const MyThreshold = 6                   ' how many characters to receive until done
  
 Const comEvSend = 1                     ' enumeration of comm events
 Const comEvReceive = 2
 Const comEvCTS = 3
 Const comEvDSR = 4
 Const comEvCD = 5
 Const comEvRing = 6
 Const comEvEOF = 7
  
 Const comInputModeText = 0              ' enumeration of input mode constants
 Const comInputModeBinary = 1
  
  
 Set objTest = CreateObject ("MSCOMMLib.MSComm", "[/b]MSCommEvent_")    ' second parameter (MSCommEvent_) +
                                         ' name of event (OnComm) creates the
                                         ' event handler that is called when
                                         ' the event fires
  
 objTest.CommPort = MyPort               ' select a port to use
 objTest.InputLen = 0                    ' if = 0, will retrieve all waiting chars
 objTest.InputMode = comInputModeText    ' causes Input() to return string (not array)
 objTest.RThreshold = 2                  ' must be non-zero to enable receive
 objTest.PortOpen = TRUE                 ' open COM port for use
  
 s = MyBaud & ",n,8,1"                   ' settings: baud,parity,bits,stop in BSTR
 objTest.Settings = s                    ' send to COM port
  
 msg = "Test Message "
 objTest.Output = msg                    ' send test message out of port
  
 objTest.PortOpen = FALSE                ' close port
  
  
 Set objTest = Nothing                   ' uninitialize reference pointer
  
  
 REM ---------------------------------------------------------------------------
 
 End Sub
  
 Sub MSCommEvent_OnComm                  ' OnComm event handler
     Select Case objTest.CommEvent
         Case comEvReceive
             rxCnt = rxCnt + objTest.InBufferCount
             rxBuf = rxBuf & objTest.Input
             If rxCnt >= MyThreshold Then
                 For i = 2 To MyThreshold Step 2
                 Next
                 flag = TRUE
                 rxCnt = 0
             End If
         Case Else
     End Select
End Sub

not testet, but i think it should work.

Thomas

2400
General Mach Discussion / Re: Re-routing input to output in Mach??
« on: March 05, 2015, 02:36:29 AM »
Hello Juha,

i think this should work:

Sub Main()

    'check status of OUTPUT1
    If getoemled(852) = true  Then GoTo dude
   
    'ask Operator to enable output
    Response = MsgBox ("Do you realy want to enable Output 1?" , 4)
    'Yes has been pressed
    If Response = 6 Then
         ActivateSignal(OUTPUT1)
    'Abort has been pressed 
    Else   
        GoTo Ende
    End If   

dude:

    'ask Operator to disable output
    Response = MsgBox ("Do you realy want to disable Output 1?" , 4)
    'Yes has been pressed
    If Response = 6 Then
         DeActivateSignal(OUTPUT1)
    'Abort has been pressed 
    Else   
        GoTo Ende
    End If   


Ende:
End Sub


Thomas