question

Kaspar Chabot avatar image
0 Likes"
Kaspar Chabot asked Kaspar Chabot commented

Photo eye edit selected objects bug - Photo Eyes dissapearing

Hi,

this is a follow-up to this question.

Just wanted to let you know that I managed to recreate the bug that caused me much frustration (luckily the autosave feature saved me).

If you select a few Photo Eyes and try to copy the triggers from a highlighted Photo Eye, not only do the triggers not copy properly, even more troubling is that some Photo Eyes start randomly dissapearing from the simulation. They still appear in the Tree but even when selected and toggling 3D Shape, they do not reappear in the model.

I love the copy into selected objects feature because it's really convenient, but it seems that I can't use it in my model with over 100 slightly different photo-eyes (meaning the use of Photo-Eye Type is limited, but some triggers are exactly the same).

It would also be great if you could just set a custom Photo Eye to be a new type, instead of trying to change the type, then watching all triggers being set to blank, having to undo the changes made, then reopening the photo eye properties window and having to text-copy all the trigger code to another Photo Eye set to the new Photo Eye type.

If somehow you would be unable to recreate this bug, I'd be happy to provide a video containing the exact steps to recreate the problem.

FlexSim 16.2.1
conveyorbugphoto eyephoto eye typedissapear
· 5
5 |100000

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

Sam Stubbs avatar image Sam Stubbs ♦ commented ·

I'm sorry that you've been experiencing difficulty. I can't seem to replicate the issue of copying triggers into photo-eyes and having them disappear or not copy. If you could provide the video that would be good, but it would be even better if you could provide the model (or an example model) that demonstrates the bug. As that will help us debug the issue.

1 Like 1 ·
Kaspar Chabot avatar image Kaspar Chabot Sam Stubbs ♦ commented ·

@Sam Stubbs

Try copying any triggers from one custom photo-eye into another in this model, you'll notice nothing happens. Copying some other variables makes the Photo Eyes disappear altogether. I managed to use PE types in a better way, but using types has the disadvantage that debugging occurs for all of the photo eyes of that type.

Kind regards,

Kaspar

buffer-model.fsm

0 Likes 0 ·
buffer-model.fsm (320.2 KiB)
Sam Stubbs avatar image Sam Stubbs ♦ Kaspar Chabot commented ·

I'm playing around with your model. But I can't seem to replicate the issue at all. All the triggers and/or PE type copies over just fine, and none of the PEs have disappeared on me. Which PEs are you copying, and from what. And how are you copying them?

0 Likes 0 ·
Show more comments

1 Answer

·
Phil BoBo avatar image
1 Like"
Phil BoBo answered Kaspar Chabot commented

The clearEvent variable doesn't contain the code that fires in the On Clear trigger. It holds a treenode pointer that is used internally by the Photo Eye object's logic.

Objects in the Conveyor Module store their settings in a unique way in order to make Types work, such as Photo Eye Types.

The clearTrigger is stored as a subnode under the localType variable. You should follow Sam's suggestion of copying All Variables, or you should use photo eye types.


· 3
5 |100000

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

Kaspar Chabot avatar image Kaspar Chabot commented ·

Ok, I think everything is cleared out now... Seems I messed up. But I only needed single triggers to be copied, otherwise I can just use PE Types as you suggest.

Therefore can I suggest for development some added functionality for photo-eyes? Features I would like to see added:

  • ability to debug single Photo Eyes of a given PE Type
  • ability to copy single triggers easily (in case photo-eyes only have a single trigger in common)
  • ability to switch a custom Photo Eye to become a new PE Type without losing all the code stored in the triggers.

Many thanks!

Kaspar

1 Like 1 ·
Phil BoBo avatar image Phil BoBo ♦♦ Kaspar Chabot commented ·

You could also use User Commands to centralize your logic to enable photo-eyes to have a single trigger in common.

Then you can just adjust your user command and all of them will adjust automatically rather than having to copy to each one after you change something.

0 Likes 0 ·
Kaspar Chabot avatar image Kaspar Chabot Phil BoBo ♦♦ commented ·

Hmm, interesting suggestion, I might try that out, thanks!

0 Likes 0 ·

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.