Campbell Hausfeld SDM-CAN Manual Do Utilizador

Página de 74
Section 3.  Programming CR10X, CR7 and CR23X 
3.4.2  Group Trigger 
The group trigger function provides a mechanism to synchronise the data capture 
by one or more SDM-CAN (and some other SDM devices too). 
This mode is enabled when an SDM-Group Trigger (P110) instruction is 
encountered. When this instruction runs, it broadcasts a special SDM message 
which causes all the SDM-CAN devices to copy the last data values captured from 
the CAN-bus into the working data buffers, and no further updates are allowed 
until P110 runs again (normally at the next execution of the program table). P118 
instructions will read the locked values which are all sampled at once. 
This SDM-Group trigger command is normally positioned at the beginning of the 
program table to lock all data samples exactly to the start of the scan interval. It 
should be remembered, however, that in the case of the SDM-CAN it will simply 
lock these values to the last values captured which could already have been 
transmitted some time earlier.  
The SDM-Group trigger instruction actually broadcasts its message to SDM 
address 33
4   
(base 4), which prevents this address being available if the SDM-
Group trigger command is to be used. This effectively reduces the number of 
SDM peripherals that support global trigger to 15 units.  
3.4.3  Frame buffers with filtering and triggering 
Operating systems V3 include the ability for the user data logger program to 
attach a buffer of 256 frames to any receiving CAN ID up to a limit of 25 different 
ID’s.  
 If the user program tries to allocate more than 25 buffers then 
the additional buffer allocations will be ignored. 
NOTE 
Each buffer can be configured as a standard ring buffer with no trigger or filter 
associated with it. The buffer can also be set to start to capture data when a 
predefined trigger pattern is encountered within the CAN data, or it can filter and 
buffer only the CAN frames that have some part of the data that fits a pattern. 
To configure a filter or trigger two masks are used. The first is user defined as a 64 
bit include AND mask applied to the CAN data of the CAN ID of interest. A 
second 64 bit user defined pattern is compared with the CAN data and when it 
matches the results of the previous `AND’ operation the buffer will either trigger 
or filter CAN data of a specific ID until the buffer is full. 
The buffer is a fill and stop ring buffer so if the buffer is full no more data will be 
stored until the logger reads a frame and makes room for another frame to be 
stored. With no mask and pattern bits set in trigger mode the buffer will trigger on 
any frame and behave as a normal ring buffer. This is useful for collecting fast 
back to back bursts of packets as the logger can collect them later in the 
knowledge the SDM-CAN will have captured up to 256 packets and stored them 
in its buffer. 
3-15