Jump to content

How to make screens similar, but different?


Recommended Posts

Posted
I would like to create objects that (although they will have some differences, like address) share a lot of attributes (like size and position) with other objects, from other screens. What is the best and most flexible way of doing this? I have tried a few options but they have their flaws: 1) Create one screen with objects, then copy these objects across to the new screen, then make a few changes. Works, but then if I want to change anything across all screens, I have to copy the objects again, and make a few changes again. 2) Use the "Edit Properties" dialog box, sort the columns to get like objects together, select a range of cells, and paste to change them simultaneously. This WOULD work well if I could view ALL objects from the project in one table, but it seems to only show them from one screen at a time...
Posted
If you mean to create additional objects with the same configuration, then copy and paste is a good way. But if you configure one object and then click the 'Use As Default' box at the bottom left of the properties window, that will become the default for all additional object created of that type. So if you want all your numeric displays to be the same, set one up, check 'Use As Default', and then create many more, they will all look the same. To clear, in the Tools menu, select 'Reset Defined Default'. As for changing them once they are created, that's a different animal. You can select all the objects you wish to change on one screen and make the changes in the 'Property List' window to change all at once, but tha's only for one screen as the 'Edit Properties' you have already found.
Posted
If it's just the address that changes, then the address can be specified indirectly. From memory, there are 9 index registers. Suffix the address with 'i0' (for example). The index registers are mapped to $SW memory ie can be mapped to the plc. The value in the index register can be calculated from the current screen number. Or simply have one screen with a button, for instance, to adjust the index register. I use the Frame object to great effect with this sort of thing as the current tab number can be used to derive the offset. Pp

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...