Campbell Hausfeld SDM-CAN Manual Do Utilizador

Página de 74
SDM-CAN CAN-Bus Interface User Guide 
•  The interrupt function only applies to data types which read data from the 
CAN-Bus. 
•  You can mark more than one P118 instruction to generate an interrupt, but 
you will then need to read data from all the possible data types which are 
indexed, as one or more may contain a new value and all new data must be 
read before the interrupt is cleared. 
•  With the CR10X and CR23X dataloggers you should ensure that all of the 
P118 instructions which are marked to cause an interrupt are in the same 
interrupt subroutine, normally number 98. Other dataloggers do not currently 
support the interrupt subroutine mechanism, but can be used in a similar mode 
by polling the digital input connected to the SDM-CAN I/O port, and only 
actually reading the data when the port is high.  
As well as indexing parameter 10 of the instructions, you also have to enable the 
interrupt function by changing an internal software ‘switch’ in the SDM-CAN. 
This is done by calling P118 with data type 32, and setting digit ‘c’ to 1 or 2. (See 
above).  
A switch value of 1 causes the interrupt function to operate in the following way: 
a)  With no Interrupt pending the I/O port is pulled low with 100Kohms. 
b)  With an interrupt pending,
 
i.e. data has been captured,
 
the SDM-CAN will 
first check that no other device is holding the port high  and then pulse high 
for 50 milliseconds. If the I/O terminal is held at +5V by another peripheral it 
will wait until the I/O terminal goes low and has been low for 50 milliseconds 
before trying to drive it high to +5V again. The I/O line has a drive 
impedance of 1Kohms.  
This method of driving the I/O line allows multiple SDM-CANs and other CSL 
products that support the I/O line to be wired in parallel. One consequence of the 
above technique, though, is that there will be a gap of up to 50 milliseconds 
following the end of one interrupt before the SDM-CAN will raise the port for 
another interrupt. This could be a limitation in high speed data capture 
applications, hence the need for switch 2. 
When switch 2 is set, the SDM-CAN responds immediately to data receipt and 
raises the port as soon as data has been received, filtered and processed. The 
SDM-CAN will only lower the line again permanently when the datalogger reads 
the data out of the SDM-CAN that caused the interrupt. To prevent problems with 
some events which might cause the datalogger to miss interrupts, the SDM-CAN 
will pulse the I/O port low for 1 ms after 50 ms, take the line high and then repeat 
this cycle until all the relevant data has been read. Using this switch setting will 
provide the quickest way of capturing data but may not work with other devices 
sharing the datalogger interrupt port. 
To ensure proper configuration of the SDM-CAN by the datalogger 
for interrupt driven applications, it will pulse its I/O port on and off 
at 50ms intervals for 6 seconds after power-up or program 
recompilation. 
NOTE 
3-14