Brodersen RTU8 Скачать руководство пользователя страница 4

 

 

It also needs to monitor that a message has been successfully sent or not. 

Selecting the telephone number, to which the message is to be sent, is simply a matter of 
setting a value in a register. The value will correspond to the number of the relevant field in 
the list of telephone numbers we entered via Ioexplorer. The first number in the list being 0 
and the last 49. 

The register is bm3, a byte marker into which we need to place a byte constant. 

If we wish to select the first number in the list we would use the command: 

mov bc0 bm3 (move a byte constant of 0 to byte marker 3) 

and for the second number in the list: 

mov bc1 bm3 

Similarly selecting the message to be sent, is simply a matter of setting a value in a register. 
The value will correspond to the number of the relevant field in the list of messages we 
entered via Ioexplorer. The first number in the list being 0 and the last 9. 

The register is bm19, a byte marker into which we need to place a byte constant. 

If we wish to select the first message in the list we would use the command: 

mov bc0 bm19 (move a byte constant of 0 to byte marker 19) 

and for the second number in the list: 

mov bc1 bm19 

When to send the message needs to be decided by the logic within the B-CON task and we 
shall look at an example below, but how to trigger the sending of the message we shall look 
at now. 

To instigate the sending of an SMS message we need to write to the Command register, bm2, 
however this register is not exclusively used for triggering SMS messages, but is also used to 
make dialup connections and hang-ups. 

The Command Register bm2 has four states: 

0 – Standby 

1 – Dial 

2 – Hangup 

3 – Send SMS 

Thus to send an SMS message we would use the command: 

mov bc3 bm2 (move a byte constant of 3 to byte marker 2) 

This value only needs to remain in the command register (bm2) for one scan, when it will by 
picked up by the firmware and actioned. It is therefore good practice to clear the command 
register at the start of each scan and the following can be placed at the top of your B-CON 
instructions: 

mov bc0 bm2 

This will set the Command register to standby, ready for the next action. 

Brodersen Controls A/S 

 Industrivej 3 

 DK-4000 Roskilde 

 Tel: +45 46 74 00 00 

 Fax: +45 46 75 73 36 

E-mail: [email protected] 

 Internet: www.brodersencontrols.com 

Содержание RTU8

Страница 1: ...tting Started Guide to SMS Funtionality V 1 00 Feb 2006 Doc 40030 Brodersen Controls A S Industrivej 3 DK 4000 Roskilde Tel 45 46 74 00 00 Fax 45 46 75 73 36 E mail bc brodersencontrols com Internet w...

Страница 2: ...lly give the correct commands to the modem manipulation of AT commands being unnecessary Up to 10 different text messages can be sent to up to 50 different telephone numbers Please note that when the...

Страница 3: ...ephone Number Scroll down the config tab and double click on the SMS Tel no field A box will appear into which you can enter the telephone number See Fig 1 3 This is the number of the SMS message cent...

Страница 4: ...command mov bc0 bm19 move a byte constant of 0 to byte marker 19 and for the second number in the list mov bc1 bm19 When to send the message needs to be decided by the logic within the B CON task and...

Страница 5: ...ad input 0 and i0 1 and input 1 jmpcn label1 jump if false mov c1 m40 0 set a marker bit chosen at random label1 jump label ld i0 0 load input 0 and i0 1 and input 1 jmpc label2 jump if true mov c0 m4...

Страница 6: ...is is clearly not what we want We only require one message to be sent when both digital inputs go active in other words to detect the leading edge This can be achieved by using an interlock bit set at...

Страница 7: ...dem acknowledges the success or not of sending the first When the modem has finished sending an SMS message it will return one of two states into marker bits m20 4 and m40 7 which can be explained thu...

Страница 8: ...abel7 jump label ld m40 1 load marker bit andn m40 3 and the interlock bit negated jmpcn label8 jump if false mov bc1 bm3 select telephone number 0 mov bc1 bm19 select message number 0 mov bc3 bm2 sen...

Страница 9: ...add wc1 increment by 1 each scan 100 msec st wm50 store counter ld wm50 load counter lt wm100 less then 100 100 x scan 100msecs jmpc label17 jump if yes mov c1 m152 0 set interlock when counter 100 la...

Страница 10: ...wm50 load counter lt wm100 less then 100 100 x scan 100msecs jmpc label17 jump if yes mov c1 m152 0 set interlock when counter 100 label4a ld m40 4 load second interlock bit jmpc label10 jump if true...

Страница 11: ...c0 m40 3 reset interlock bit label9 jump label label10 ld m20 4 load Message Sent bit or m20 7 or Message Failed bit jmpcn label11 jump if false mov c0 m40 4 reset second interlock bit label11 jump la...

Отзывы: