1/31/2017 6:31 PM | |
Joined: 3/14/2008 Last visit: 8/30/2024 Posts: 2093 Rating:
|
Hi David, You are on the right track, but there are some things not correct. But no worries There is a difference between the @TemplateAPL_V8.pdl and @PCS7Typicals_V8.pdl. Normally, blocks that are inserted in CFC, can have a block icon number assigned. During compile of the OS, the block icons are generated automatically referring to the block type in CFC. The block icons are listed in the @PCS7Typicals file. However, sometimes you will need a block which is not generated automatically and then you will use the @Template file. The difference is the "@" prefix attribute for the ServerName. Without the "@", the block icon is not generated automatically by the system. So, the easiest way is to copy the block icon from the @PCS7Typicals file. However, since you already created your block icon, please place the "@" back. Second, each block icon has an attribute called "System", which has a value: "PCS7 MotL Control" for example. This means that when the block icon is clicked on, the faceplate files which has prefix "@PG_MotL_" is called. So, instead of "MotL", fill in the name of the block type. Leave the rest intact. So, you will have to change the "FB501" name. Also, another thing you must know is that there are two kind of libraries: Classic (up to PCS7 v7.1) and the APL library. The APL library is the newest library and is your standard library to use. The FB61 (CTRL_PID) is a block from the Classic library and this will not work with an APL block icon and their faceplate (yeah, it can work, but you need to do a lot of unnecessary time consuming things). So, you will need the PIDConL block (FB1874). Or when using the classic library, please use the supplied block icon, not from the APL library. If you need more info, please look at the following thread and see my second post: https://support.industry.siemens.com/tf/us/en/posts/custom-block-icon/151745/?page=0&pageSize=10 To enable the use of alarms see the following thread for more info: https://support.industry.siemens.com/tf/cz/en/posts/alarm-8p/154536/?page=0&pageSize=10 Messages are created by using a few system attributes. To check how this is setup: Go to your Blocks folder and open an APL block with messaging like FB1845. Go to Interface and then "IN". Find "MsgEvId1" and open properties. Then check tab: "Attributes" to see which attributes are used by MsgEvId. You can address the individual bits to generate the message. You can configure the messages by double clicking your custom block type and under: "Messages" you can configure this. But you will need to use the correct system attributes.
|
Last edited by: Oreca at: 1/31/2017 6:41:00 PMLast edited by: Oreca at: 1/31/2017 7:06:59 PMIf I could help you, you can use the RATE button. Thank you. |
|
This contribution was helpful to
1 thankful Users |
2/13/2017 10:21 AM | |
Posts: 3 Rating:
|
Is there any1 who can help me? |
2/13/2017 1:56 PM | |
Joined: 3/14/2008 Last visit: 8/30/2024 Posts: 2093 Rating:
|
Hi David, I didn't see your reply yet, so sorry for the delay. See below an example on how to use the MsgEvid1.
First, you can declare a variable as Alarm_8P type. Then, you can call the Alarm_8P as below. You'll see that parameter EV_ID has value "MsgEvId1". For the SIG_1 to SIG_8 means that this is message 1 to 8. As you can see, you can declare code here to trigger the message 1-8.
S7_a_type is important. It will tell you that the variable with this attribute is used as alarm, alarm_8p, notify, alarm_s. S7_server is used to configure your messages and the compiler assigns a unique archive number for the messages. S7_link (=false) must be used, because you must not assign an interconnection to the MsgEvid1 variable. With this, it means you cannot connect anything in CFC. S7_visible (=false)means MsgEvid1 is not displayed in the block when using in CFC. Because you cannot connect anything, it is automatically hidden with this attribute. S7_param (=false) means you cannot assign any other parameters, so this is used for the MsgEvid1. For more info about system attributes, see the help file when in SCL and search for "Help on System Attributes". When your block is ready, you can go to the "Blocks" folder and search for the FB number of your custom SCL. Then, right click->Special Object Properties->Message will let you configure the default message types and default texts. When you use multiple block instances, each instance will have the default message types and texts you filled in here. You can tell if the message has single acknowledgement, so each of the messages must be accepted individual, or it has group acknowledgment (accepting a group will accept all messages in the group). Priority is normally not used, but can be used if there are some important messages, they will assigned a higher priority.
|
Last edited by: Oreca at: 2/13/2017 2:14:14 PMIf I could help you, you can use the RATE button. Thank you. |
|
Follow us on