Hello Guest it is November 26, 2020, 05:06:12 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

881
VB and the development of wizards / Re: VB - vbNullChar pass to function
« on: November 19, 2018, 03:16:29 AM »
Looks like cypress can not handle the CHR(0)

if you try

strTest = &H00
len(strTest) gives the result 1

882
try this, not tested just had a look for the Compiler error

Code: [Select]
Option Explicit

Dim Signal_nr As Integer   'gets signal nr from the P-word
Dim Trigger As Integer  'gets the trigger event variant from the Q-word
Dim Input_nr As String 'to combine SIGNAL string with its number from the P-word for the IsActive command


Signal_nr = Param1() 'Get P-value
Trigger = Param2() 'Get the Q-value
Input_nr="INPUT" & Signal_nr 'this one should create a string "SIGNAL#" with the # number from P-word to use as parameter for commands
Select Case Trigger
 
   Case 0 'IMMEDIATE - triggered immediately on the given signal HIGH detection.
      SystemWaitFor(Input_nr)
   
   Case 1 'RISING EDGE - triggered immediately on the given signal RISING EDGE
      While IsActive(Input_nr)
      Wend
      SystemWaitFor(Input_nr)
   
   Case 2 'FALLING EDGE - triggered immediately on the given signal FALLING EDGE
      While IsActive(Input_nr)
      Wend
   
   Case 3 'HIGH - triggered on the detection of the HIGH state of the signal as opt. 0 but waits for the previous move to finish
      SystemWaitFor(Input_nr)
      While IsMoving()
      Wend
   
   Case 4 'LOW - triggered on the detection of the LOW state of the signal as opt. 1 but waits for the previous move to finish
      While IsActive(Input_nr)
      Wend
      While Ismoving()
      Wend
   
End Select


883
General Mach Discussion / Re: Set up 2 probes at same time in Mach 3
« on: November 16, 2018, 01:44:14 AM »
If I could figure out how to attach an image to this post I would include a circuit diagram for the two cases.

if you use the reply button, you should get the Additional Option possibilty, where you can attach files.

884
General Mach Discussion / Re: Set up 2 probes at same time in Mach 3
« on: November 15, 2018, 02:03:26 PM »
I use an output pin to a couple of gates to select which probe I want to use (under Mach3). But that is custom.

Cheers
Roger



Thanks Roger.
I've had a bit of a play ..... I can use the same input but one probe requires a HI signal and the other a LO, so as it stands now, I still have to change the configuration in Mach 3 each time I change probes.
Instead of a gate or a relay , I was thinking of using a changeover switch, but I still have the other problem to overcome yet.
Steve

ok then you have to put an other locic/relay in front of the selctor Switch or selector relay,
to get the two probes onto the same switching Level (hi or low what ever you want)

885
General Mach Discussion / Re: Set up 2 probes at same time in Mach 3
« on: November 15, 2018, 09:33:55 AM »
never saw a documentation about how to Change Input Parameters via VBScript,
maybe someone else know about a possibility.

886
General Mach Discussion / Re: Exporting tool table
« on: November 15, 2018, 09:28:56 AM »
i guess he wanted to move the toolinformation from one mach3 to an other mach3 machine.

887
General Mach Discussion / Re: Exporting tool table
« on: November 15, 2018, 02:34:13 AM »
i am not a 100% sure,

but i think

c:\mach3\macros\your Profile Name\tool3.dat

contains all the tool data.

888
CS-Lab / Re: Lag on inputs
« on: November 15, 2018, 02:25:36 AM »
hello,

you can try to add two additional relays for a "Hardware Stop"

according to attached drawing

Rel1 -> Motor turn relay
Rel2 -> enable stop relay
Rel3 -> stop relay paralell to CSMIO Input

Software sequence would be:
1- turn Rel1 on to turn turret
2- if turret Position reached turn Rel2 on to enable HW Stop
3- if Input is ON turn OFF Rel1 + Rel2

with this small circuit you will get the fastest stop time, because the Rel3 will turn OFF the motor




889
General Mach Discussion / Re: tool changer
« on: November 09, 2018, 07:31:18 AM »
in this case M6End is not needed

890
General Mach Discussion / Re: tool changer
« on: November 09, 2018, 07:09:05 AM »
depends on, what you have selected in Config -> General Config