Cancel
Showing results for 
Search instead for 
Did you mean: 

Set sensor's control via Simtalk

Pioneer
Pioneer

Hi all,

 

I am currently creating and assembly line model which contains several lines with sensors. As the scenarios keep changing really fast, I am creating these lines via SimTalk.

 

The issue is that I want to assing a method to these sensors via SimTalk. I tried doing:

 

path.sensorID(1).Control := ControlPath

 

but it doesn't work.

 

Can you help me with that?

4 REPLIES

Re: Set sensor's control via Simtalk

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

in this way you call the method and the result will be set as the path

 

there are different ways:

 

you can pass the path/name as string

 

path.sensorID(1).Control := "ControlPath"

 

or as reference

 

path.sensorID(1).Control := &ControlPath

 

Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Set sensor's control via Simtalk

Pioneer
Pioneer

I've tried both ways and I keep getting the same message "Unknown identifier Control"

Re: Set sensor's control via Simtalk

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor
the right attribute is Ctrl try

path.sensorID(1).Ctrl := "ControlPath"
Steffen Bangsow
freelance simulation specialist  
web: www.bangsow.eu
mail: steffen@bangsow.net

Re: Set sensor's control via Simtalk

Pioneer
Pioneer

I must confess, this is a rather counter intuitive nomenclature.. All labels used are "Control", but the attribute is "Ctrl".

 

It works, thanks for the help!