Please enable JavaScript to view this site.

When you need to receive a group of data (variables) at fixed frequency from a connected device, the ideal solution is to program and play a realtime variable monitor. This will send you required data at request frequency, if possible.

Using a monitor

In order to use a monitor you have to perform the following steps:

1.Create the monitor

2.Start the monitor

3.Receive the data until desired or operation expired

4.Stop the monitor

5.Destroy the monitor

Each monitor is indentified by a couple of 32bit values, called owner ID and monitor ID. You should assign a value to owner ID in order to distinguish you from other possible monitor clients (use a pseudo random 32bit value): the monitor ID is assigned by the connected device (don't make any assumption about the value of next monitor ID).

First of all create your monitor definition with bccMonCreate command: if successfully, it will give you the monitor ID. When you are ready to receive data from monitor, start it with the bccMonStart command, by indicating owner & monitor ID and required data frequency (hz): if successfully, the device will respond with the effective data frequency applied (not necessary what you required). If you don't agree with the data frequency, stop now the monitor with bccMonStop command.

While receiving data, at applied frequency (or less if device is overloaded), you have to periodically grant data transmission (command bccMonWd) by indicating granted time in [ms]: the device will transmit data until this time is expired or a new grant replace the old one. This means that the device will sent data only if feel that client is connected and receive data, otherwise it will expire and stop the monitor automatically.

Caution:

If you give a grant time (for example) of 5000ms, be sure to transmit the new grant before that time (for example at 4500ms) otherwise you risk that the monitor expire before new grant is acknowledged. If expired and yet valid, when you send a new bccMonWd, the monitor is automatically restarted.

If you create a monitor and lost it, when you create an other monitor and start it, if you use bccMonWd for all owner monitors, you will restart the lost monitor too. Then, Before create the new monitor, destroy all monitor for that owner or check monitor status with bccMonStatus.

Incoming data from the monitor is carried by bccData message: see bccMonStart for more information.

When you don't want more data from monitor, or you don't receive data for a time (you can use the same grant time), you can stop the monitor with the bccMonStop command. If monitor is no more needed, can be destroyed with the bccMonDestroy command.

Each command you send for the monitor (bccMonStart, bccMonStop, bccMonDestroy) always need the owner and monitor ID: if these informations are not matched on the device, the operation will be denied.

Using multiple monitor

In the case you need multiple monitor at one time (for example required data does not fit in a single monitor), you can perform the following task (similar to single monitor usage):

1.Create all monitor definition and keep a list of all created monitor ID

2.Start separately each monitor (with monitor ID) or start all monitor of the owner (with special monitor ID 0xFFFFFFFF).

3.Receive the data for all monitors until desired or operation expired: grant periodically the transmission separately for each monitor (with monitor ID) or grant all owner monitor (with special monitor ID 0xFFFFFFFF)

4.Stop separately each monitor (with monitor ID) or start all monitor of the owner (with special monitor ID 0xFFFFFFFF)

5.Destroy separately each monitor (with monitor ID) or start all monitor of the owner (with special monitor ID 0xFFFFFFFF).

 

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Contents: ALT+c
Search: ALT+s
Exit Menu/Up: ESC