MC_BR_TouchProbe usage in ARSim

Hello Community,

Does anyone had experience with using MC_BR_TouchProbe in ARSim?

I tried using it together with MC_BR_ForceHardwareInputs to force Trigger 1 which is set as the Event Source for the touch probe, when i set Trigger 1 to TRUE, it doesn’t seem to be recognizing any event at all and stays at mcTRG_STAT_WAITING.

I am using an Axis connected on an ACOPOS P3 (in ARSim) perhaps it doesn’t work that way?

Hello,

i have created a small Test-Projekt with MappMotion and ARsim.
i would say it will work.

  1. Check if the MC_BR_ForceHardwareInputs is set up correct and the Status on the Cockpit for Trigger1 is changing. Please consider that the Setting of the AxisConfiguration has to be changed between real and simulated usage.


  2. Prepare a Task with the Sample-Code to set up the Functions later via Watch-Window
    I did use TC#1

PROGRAM _INIT
	(* Insert code here *)
	 
	
	MC_BR_ForceHardwareInputs_0.Axis 	:= ADR(gAxis_1); 
	MC_BR_ForceHardwareInputs_0.Enable 	:= 1; 
	
	MC_BR_TouchProbe_0.Axis											:= ADR(gAxis_1);
	MC_BR_TouchProbe_0.TriggerInput.ValueSource 					:= mcVALUE_SET; 				
	MC_BR_TouchProbe_0.TriggerInput.EventSource						:= mcEVENT_SRC_TRIGGER1; 
	MC_BR_TouchProbe_0.TriggerInput.Edge							:= mcEDGE_POSITIVE; 
	MC_BR_TouchProbe_0.TriggerInput.MinWidth						:= 0; 
	MC_BR_TouchProbe_0.TriggerInput.MaxWidth						:= 0; 
	MC_BR_TouchProbe_0.TriggerInput.SensorDelay						:= 0; 
	MC_BR_TouchProbe_0.TriggerInput.DisableWidthEvaluationAtStart	:= FALSE;
	MC_BR_TouchProbe_0.Period										:= 0; 
	MC_BR_TouchProbe_0.PeriodChange									:= 0; 
	MC_BR_TouchProbe_0.ExpectedValue								:= 0; 
	MC_BR_TouchProbe_0.WindowNegative								:= 0; 
	MC_BR_TouchProbe_0.WindowPositive								:= 0; 
	MC_BR_TouchProbe_0.Mode												:= mcTP_MODE_WITHOUT_PERIOD; 
	MC_BR_TouchProbe_0.AdvancedParameters.UseFirstTriggerPosition		:= 0; 
	MC_BR_TouchProbe_0.AdvancedParameters.UseAxisPeriod					:= 0; 
	MC_BR_TouchProbe_0.AdvancedParameters.UpdatePeriod					:= 0; 
	MC_BR_TouchProbe_0.AdvancedParameters.ReadTriggerWidth				:= 0; 
	MC_BR_TouchProbe_0.AdvancedParameters.SubstituteValueWindowPosition	:= 0; 
	MC_BR_TouchProbe_0.AdvancedParameters.IncreaseTriggerCountNoTrigger	:= 0; 
	
END_PROGRAM

PROGRAM _CYCLIC
	
	MC_BR_ForceHardwareInputs_0();
	MC_BR_TouchProbe_0();
 
END_PROGRAM
  1. Via Watch Window i have enabled the TouchProbe Function, then i have set the Trigger. The Status of Touch Probe has changed to “mcTRG_STAT_VALID”

Here my Sample as Zip.
TestTouchProbe.zip (9.7 MB)

Greetings
Michael

2 Likes

Hi Michael,

Thanks for the tips. I missed the part about axis configuration to set it to forced trigger From function block.

1 Like