Configuring Tags for Generic Commands

<< Click to Display Table of Contents >>

 

Configuring Tags for Generic Commands

The configuration of Tags for generic commands is a special functionality of this Driver that allows programming a command directly using an EAP code defined by a manufacturer. Thus, any other commands not defined by a manufacturer can be executed, as long as information about these commands are provided by Agridatalog srl. This also includes devices created in the future and use the EAP serial protocol for communication.

Users can use PLC or Block Tags, depending on the amount of information a command requires. The interpretation of N or B parameters is relative to fixed commands per device, according to the next table.

 

N1 or B1

Index of a generic command. This value must be always equal to 4 (four)

N2 or B2

EAP code of a command

N3 or B3

Address of a destination device

N4 or B4

Number composed by a reading or writing permission and the bytes to receive or transmit

 

The N2 or B2 parameter must be filled with a code that ranges between 0 (zero) and 255 (or FFFFh in hexadecimal notation). The N4 or B4 parameter must be filled with the next information:

Number of bytes to receive or send by a command, between 0 (zero) and 255

Permission for a command to read or write, a fixed value equal to 256

 

If a command is for reading and writing, sum the number of bytes to receive to the fixed value of 256. For example, if the total number of bytes to receive is equal to 8 (eight), the value of the N4 parameter must be equal to 264.

The indication of reading and writing of a command can be omitted when performing only readings in a Tag for a reading and writing command or if a command allows only reading or only writing.

 

NOTE

EAP command codes, as well as information about the number of bytes and reading and writing permissions, must be checked on tables provided by a manufacturer. A reading and writing permission is represented by the P letter on the Cat. column of Agridatalog srl's tables.

 

The next information contains important considerations about the configuration of Tags for generic commands.

 

In Case of Reading

When informing the reception of 1 (one), 2 (two), or 4 (four) bytes, the value read can be configured in a PLC Tag or a Block Tag with a single Element. For other values, create a Block Tag with the number of Elements equal to the number of bytes to receive, because each Element read a byte from the response of a command

Informing a value 0 (zero) to the number of bytes to receive is not allowed

The maximum value of bytes to receive is 255

 

In Case of Writing

When informing the transmission of 1 (one), 2 (two), or 4 (four) bytes, the value sent is in the Value property of a PLC Tag or in the Value property of the first Element of a Block Tag. When informing the transmission of 6 (six) bytes, typical of writing a date-and-time value, each Element of a Block Tag with 6 (six) Elements contains the value of these bytes for transmission

Users can inform a value 0 (zero) for the number of bytes to send, because there are commands that do not need to send values

Values different from 0 (zero), 1 (one), 2 (two), 4 (four), and 6 (six) for the number of bytes to send are not supported for writing

 

For example, for a T1MIN command from a Cellostat CS950A/G device, users have the following values:

EAP code: 20h

Size of information: 2 (two) bytes

Permission: Reading and writing

 

To express that command in a generic way, consider that this is an information with a size of 2 (two) bytes. Therefore, users only need a PLC Tag with the N1 parameter equal to 4 (four), the N2 parameter equal to 32 (20h in hexadecimal), the N3 parameter with the address of a destination device, and the N4 parameter equal to the sum of value 256, which indicates a reading and writing permission, with the value of 2 (two) bytes to receive or send. Thus, the N4 parameter must be equal to 258.

Indexes for models of devices

N1 or B1

Device

0

Cellostat CS950A/G

1

Agri Controller 2500

2

Sequencer (CMP8/16/4+4GL/2+2GL)

3

Econom (EC55/EC100)

4

Generic command

 

List of commands for Cellostat CS950A/G devices (the N1 or B1 parameter equal to 0)

N2 or B2

Command

Permissions

0

PING

Write-only

1

RESET

Write-only

2

PORT

Read-only

3

STATUS

Read-only

4

STORE

Write-only

5

T1

Read-only

6

T2

Read-only

7

TV

Read-only

8

TGV

Read-only

9

TGR

Read-only

10

TA

Read-only

11

RF

Read-only

12

T1MIN

Reading and writing

13

T1MAX

Reading and writing

14

TVMIN

Reading and writing

15

TVMAX

Reading and writing

16

ALMIN

Reading and writing

17

ALMAX

Reading and writing

18

TGVMIN

Reading and writing

19

TGVMAX

Reading and writing

20

THMIN

Reading and writing

21

THMAX

Reading and writing

22

RFMIN

Reading and writing

23

RFMAX

Reading and writing

 

List of commands for Agri Controller 2500 devices (the N1 or B1 parameter equal to 1)

N2 or B2

Command

Permissions

0

PING

Write-only

1

RESET

Write-only

2

TROOM

Read-only

3

GCO2

Read-only

4

GO2

Read-only

5

GROOM

Read-only

6

RLZ

Read-only

7

RSTATE

Reading and writing

8

RCO2MAX

Reading and writing

9

RCO2NOM

Reading and writing

10

RO2MIN

Reading and writing

11

RO2NOM

Reading and writing

12

GCYCLEID

Read-only

13

GP

Read-only

14

LZADSO

Read-only

15

FQADSO

Read-only

16

LZAIR

Read-only

17

FQAIR

Read-only

18

LZOXI

Read-only

19

FQOXI

Read-only

20

DATTIM

Reading and writing

 

List of commands for Econom (EC55/EC100) devices (the N1 or B1 parameter equal to 2)

N2 or B2

Command

Permissions

0

PING

Write-only

1

RESET

Write-only

2

PORT

Read-only

3

STATUS

Read-only

4

STORE

Write-only

5

P

Read-only

6

PMAX

Reading and writing

 

List of commands for Sequencer (CMP8/16/4+4GL/2+2GL) devices (the N1 or B1 parameter equal to 3)

N2 or B2

Command

Permissions

0

PING

Write-only

1

RESET

Write-only

2

PORT

Read-only

3

STATUS

Read-only

4

STORE

Write-only

5

RUNMAP

Read-only

6

ERRMAP

Read-only

Was this page useful?