cancel
Showing results for 
Search instead for 
Did you mean: 

Problem Creating Joint value sense set to pulse

Valued Contributor
Valued Contributor

Hi

 

I am trying to create a joint value sense that is set to pulse please see below what I have

Dim nullValue As Nullable(Of Double)

Dim JointValue As Nullable(Of Double) = joint.UpperSoftLimit

Dim PlcLogicBehaviorAtPoseSensorData1 As New TxPlcLogicBehaviorAtPoseSensorData(joint, 0, Extra_Math.RadToDeg(joint.UpperSoftLimit), Extra_Math.RadToDeg(joint.UpperSoftLimit) + 1, False)

Dim PlcLogicBehaviorAtPoseSensorParameterCreationData1 As New TxPlcLogicBehaviorAtPoseSensorParameterCreationData("At Retract", PlcLogicBehaviorAtPoseSensorData1)

PlcLogicBehaviorAtPoseSensorParameterCreationData1.SensorData.RangeValue = 100

PLClogicBehavior.CreateParameter(PlcLogicBehaviorAtPoseSensorParameterCreationData1)

 

There is strange parameter in the creation data that require  double nullalbe variable. Could someone give me some details on how this must work please.

 

Thanks

 

5 REPLIES

Re: Problem Creating Joint value sense set to pulse

Siemens Legend Siemens Legend
Siemens Legend

Hi,

 

The rangeLow and rangeHigh are relative to the rangeValue. Your code is creating a Range type parameter (rangeHigh is greater than rangeLow). To make it a Pulse parmeter type set the rangeLow and rangeHigh to be equal, you can set the rangeValue to 0.0 which is the default.

Re: Problem Creating Joint value sense set to pulse

Valued Contributor
Valued Contributor

Hi

 

Thank you very much I understand and have tested it. The next problem I have is that once I have created the sensor it only works if I edit logic resource and hit apply, then the open sensor come on straight away. I have even gone as far as doing a binary compare betwee all xml files in the resources .cojt directory and they are indentical. There must be something else that this apply does to the resource to activate the senor.

 

Thanks again for the help

Re: Problem Creating Joint value sense set to pulse

Siemens Legend Siemens Legend
Siemens Legend

Hi,

 

Is you resource in modeling when you add the parameter? Can you share the exact code that you use to create the sensor parameter (can send it over the e-mail)?

Re: Problem Creating Joint value sense set to pulse

Valued Contributor
Valued Contributor

Hi

 

Yes Modeling is set. I can send the code please send me en email address

 

Thanks

Re: Problem Creating Joint value sense set to pulse

Siemens Legend Siemens Legend
Siemens Legend

The RangeValue in the constructor of TxPlcLogicBehaviorAtPoseSensorData for Pulse parameters should be set to 0.0

Dim PlcLogicBehaviorAtPoseSensorData1 As New TxPlcLogicBehaviorAtPoseSensorData(joint, 0, joint.UpperSoftLimit, joint.UpperSoftLimit, False)