> ## Documentation Index
> Fetch the complete documentation index at: https://notevil.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CAPLfunctionCoTfsWToArr

# coTfsWToArr

[Valid for](../../../../Shared/FeatureAvailability.md): CANoe DE • CANoe:lite DE • CANoe4SW DE

## Function Syntax

```plaintext theme={null}
long coTfsWToArr( word wordValue, byte outByteArray[], dword arraysize );
```

## Description

The function converts a word value into a byte array.

## Parameters

* **wordValue**: Value to be converted.
* **outByteArray\[]**: Array containing the converted value, recommended array size: 2 byte.
* **arraysize**: Size of the byte array.

## Return Values

[Error code](../CAPLfunctionsCANopenNLTFSErrorCodes.md)

## Example

```c theme={null}
/* converts a word value to a byte array */
Word inValue = 2345;
Byte outDataArr[2];

if (coTfsWToArr(inValue, outDataArr, 2) != 1)
{
  /* conversion failed */
} /* if */
```
