question

Trex avatar image
0 Likes"
Trex asked tannerp commented

How to access the node data value through code

Hello,

I want to access the data of node type through code, how can I access.
Node type is a subnode of conveyor, where "type" node represents which conveyor type it follows

Actually I need to access a conveyor type from a trigger when a part flows inside the conveyor,

kindly help

FlexSim 19.0.2
conveyorcodetreenodenodeconveyor type
capture.jpg (33.0 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
tannerp avatar image
0 Likes"
tannerp answered tannerp edited

Hi @Trex,

Have you tried using the below function?

getvarnode(myObject, "node").value

For example, if I wanted the "maxcontent" value on a Queue like in the image below, I could use the following code.

getvarnode(Model.find("Queue1"), "maxcontent").value

This line of code in the example would return 1000.00.

You didn't upload a model, but I'm assuming that if you have things set up correctly, you can read the object's type in a similar fashion, but using a trigger on an entry transfer or photo eye or something. If you post an example, I'd be happy to show you what I'm thinking could work.


wanted-node.png (12.8 KiB)
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.