*SCE command issues
a_riot42
Posts: 1,624
in AMX Hardware
Has anyone had the opportunity to use the ^SCE command? From the docs, you can set up a custom event for page views which is executed when either a reorder occurs, or when the subpage that is in the anchor position changes, or when a subpage goes in or out of view. I only want to be notified when a reorder occurs, but nothing else, and so my command looks like this:
^SCE-200,0, 0 ,0 ,32001
The last field is for the event number you've chosen to use for a reorder event. But what I am finding is that even though the first three fields are 0, my reorder event is executed when one of the other three events occurs, which I think is a bug. In other words, when I scroll the subpages without reordering, event 32001 runs. Using ^SCE-200,0, 0 ,0 ,0 turns off all 4 events, and so I assumed that you can listen for each of the 4 events by populating the 4 fields with event numbers. But what I am seeing is that if I do this:
^SCE-200,0, 0 ,0 ,32001
to listen to reorder events only, when I scroll, it gets executed. So if any of the 4 events occurs my reorder event is run. Since I have to do different things depending on which event actually occurred, there is no way to only have the event run when a reorder happens, and not when the anchor position changes, or a subpage goes in/out of view. Its as if I sent ^SCE-200, 32001, 32001, 32001, 32001 instead of ^SCE-200,0, 0 ,0 ,32001. I'm testing on an iPad so it might be different on a touch panel. Has anyone come across this before?
This is what Pi2 says about it: ^SCE
Subpage custom event command - Configure subpage custom events. This command can be used to enable or disable the transmission of custom events to the master whenever certain operations occur. For example, the system programmer may want to be notified whenever a subpage enters the anchor position. The notification mechanism is a custom event. The ^SCE command takes the form of a addr range specifying one or more subpage viewer buttons followed by a comma separated list of custom event numbers. If the number is 0 or blank for a given event type then no custom event will be transmitted when that event occurs. If a number is specified, then it is used as the EVENTID value for the custom event. The range of 32001 to 65535 has been reserved in the panel for user custom event numbers. A different value could be used but might collide with other AMX event numbers. Event configuration is not permanent and all event numbers revert to the default of 0 when the panel restarts.
Syntax:
"'^SCE-<addr range>,<optional anchor event num>,<optional onscreen event num>,<optional offscreen event num>,<optional reorder event num>'"
Variables:
The events are:
In response to any or all of the above events, the panel will create a string which is a list of subpage names separated by a pipe (|) character. The string for the anchor event is a single subpage name. If this string is too long to be transmitted in a single custom event, then multiple custom events will be created and transmitted. If defined, the events are sent in this order when a docking operation completes on a given viewer button: anchor, onscreen, offscreen. If reorder is defined and occurs, it is sent first: reorder, anchor, onscreen,offscreen.
The format of the custom event transmitted to the master is as follows:
Custom Event Property
Value
Port
port command was received on
ID
address of the button generating the event
Type
the non-zero event number in the ^SCE command
Flag
0
Value 1
which one of possible multiple events this is (1 based)
Value 2
total number of events needed to send the entire string
Value 3
the total size of the original string in bytes
Text
pipe character separated list of subpage names
Example:
SEND_COMMAND Panel, "'^SCE-200,32001,0,0,0'"
If the subpage named TV_Favorite_SyFy enters the anchor position on a subpage viewer button with an address of 200, the following event would be transmitted to the master when the user had sent this command to the panel:
Custom Event Property
Value
Port
port command was received on
ID
200
Type
32001
Flag
0
Value 1
1
Value 2
1
Value 3
16
Text
TV_Favorite_SyFy
Paul
^SCE-200,0, 0 ,0 ,32001
The last field is for the event number you've chosen to use for a reorder event. But what I am finding is that even though the first three fields are 0, my reorder event is executed when one of the other three events occurs, which I think is a bug. In other words, when I scroll the subpages without reordering, event 32001 runs. Using ^SCE-200,0, 0 ,0 ,0 turns off all 4 events, and so I assumed that you can listen for each of the 4 events by populating the 4 fields with event numbers. But what I am seeing is that if I do this:
^SCE-200,0, 0 ,0 ,32001
to listen to reorder events only, when I scroll, it gets executed. So if any of the 4 events occurs my reorder event is run. Since I have to do different things depending on which event actually occurred, there is no way to only have the event run when a reorder happens, and not when the anchor position changes, or a subpage goes in/out of view. Its as if I sent ^SCE-200, 32001, 32001, 32001, 32001 instead of ^SCE-200,0, 0 ,0 ,32001. I'm testing on an iPad so it might be different on a touch panel. Has anyone come across this before?
This is what Pi2 says about it: ^SCE
Subpage custom event command - Configure subpage custom events. This command can be used to enable or disable the transmission of custom events to the master whenever certain operations occur. For example, the system programmer may want to be notified whenever a subpage enters the anchor position. The notification mechanism is a custom event. The ^SCE command takes the form of a addr range specifying one or more subpage viewer buttons followed by a comma separated list of custom event numbers. If the number is 0 or blank for a given event type then no custom event will be transmitted when that event occurs. If a number is specified, then it is used as the EVENTID value for the custom event. The range of 32001 to 65535 has been reserved in the panel for user custom event numbers. A different value could be used but might collide with other AMX event numbers. Event configuration is not permanent and all event numbers revert to the default of 0 when the panel restarts.
Syntax:
"'^SCE-<addr range>,<optional anchor event num>,<optional onscreen event num>,<optional offscreen event num>,<optional reorder event num>'"
Variables:
- address range: Address codes of buttons to affect. A '.' between addresses includes the range, and & between addresses includes each address.
- anchor event number: 0 for no event or a value from 32001 to 65535.
- onscreen event number: 0 for no event or a value from 32001 to 65535.
- offscreen event number: 0 for no event or a value from 32001 to 65535.
- reorder event number: 0 for no event or a value from 32001 to 65535.
The events are:
- anchor - a new subpage has docked in the anchor position.
- onscreen - a docking operation has been completed and the subpages in the list are now onscreen. This list will include the anchor along with any subpages that may be partially onscreen.
- offscreen - a docking operation has been completed and the subpages in the list are now offscreen.
- reorder - the user has reordered the subpages in the set and the list contains all subpages in the new order without regard to onscreen or offscreen state.
In response to any or all of the above events, the panel will create a string which is a list of subpage names separated by a pipe (|) character. The string for the anchor event is a single subpage name. If this string is too long to be transmitted in a single custom event, then multiple custom events will be created and transmitted. If defined, the events are sent in this order when a docking operation completes on a given viewer button: anchor, onscreen, offscreen. If reorder is defined and occurs, it is sent first: reorder, anchor, onscreen,offscreen.
The format of the custom event transmitted to the master is as follows:
Custom Event Property
Value
Port
port command was received on
ID
address of the button generating the event
Type
the non-zero event number in the ^SCE command
Flag
0
Value 1
which one of possible multiple events this is (1 based)
Value 2
total number of events needed to send the entire string
Value 3
the total size of the original string in bytes
Text
pipe character separated list of subpage names
Example:
SEND_COMMAND Panel, "'^SCE-200,32001,0,0,0'"
If the subpage named TV_Favorite_SyFy enters the anchor position on a subpage viewer button with an address of 200, the following event would be transmitted to the master when the user had sent this command to the panel:
Custom Event Property
Value
Port
port command was received on
ID
200
Type
32001
Flag
0
Value 1
1
Value 2
1
Value 3
16
Text
TV_Favorite_SyFy
-
- If defined, the events are sent in this order when a docking operation completes on a given viewer button: anchor, onscreen, offscreen.
- If reorder is defined and occurs, it is sent first: reorder, anchor, onscreen, offscreen
Paul
0
Comments
"We have confirmed the issue and reported it to engineering. The command appears to work properly in firmware 2.106.46 on g4 panels and is not working as expected in version 2.108.40."
Paul