Acrosser Technology AR-B104D Owner's manual

Type
Owner's manual

Acrosser Technology AR-B104D is a PCI-104 board that offers a range of capabilities for industrial automation and data acquisition applications. It features 12 general-purpose input channels with pulse counter functionality, 12 general-purpose output channels with pulse generator functionality, SRAM with battery backup, a hardware timer, and a CAN-bus interface. With its versatility, the AR-B104D can be used for various tasks, including monitoring sensor inputs, generating control signals, storing critical data, and communicating with other devices over a CAN network.

Acrosser Technology AR-B104D is a PCI-104 board that offers a range of capabilities for industrial automation and data acquisition applications. It features 12 general-purpose input channels with pulse counter functionality, 12 general-purpose output channels with pulse generator functionality, SRAM with battery backup, a hardware timer, and a CAN-bus interface. With its versatility, the AR-B104D can be used for various tasks, including monitoring sensor inputs, generating control signals, storing critical data, and communicating with other devices over a CAN network.

AR-B104D
Software Guide V1.0
AR-B104D Software Programming Guide
i
Revision
Version Date Author Description
0.1 2010/5/17 Bankle Chen Draft
0.2 2010/7/21 Bankle Chen Add Canbus related function
1.0 2010/8/4 Bankle Chen Add callback function table
example and OS notes
AR-B104D Software Programming Guide
ii
Table of Contents
Chapter 1 Introduction .............................................................................. 1
Chapter 2 Application Interface................................................................2
2.1 General Usage..............................................................................2
2.1.1 RegisterCard......................................................................2
2.1.2 ReleaseCard.......................................................................2
2.1.3 GetIOBaseAddr..................................................................2
2.1.4 GetMemBaseAddr .............................................................3
2.1.5 GetEventBuffer ..................................................................3
2.1.6 GetEventCounter...............................................................3
2.1.7 SetCallbackFunc ...............................................................3
2.2 SRAM ............................................................................................6
2.2.1 ReadMemByte....................................................................6
2.2.2 ReadMemWord ..................................................................6
2.2.3 ReadMemDWord................................................................6
2.2.4 WriteMemByte ...................................................................6
2.2.5 WriteMemWord ..................................................................7
2.2.6 WriteMemDWord................................................................7
2.2.7 SwitchMemMode ...............................................................7
2.2.8 ReadMemBlock..................................................................7
2.2.9 WriteMemBlock .................................................................8
2.3 General Purpose Input/Output....................................................9
2.3.1 ReadInputChannel.............................................................9
2.3.2 SetInputMode.....................................................................9
2.3.3 GetInputMode ....................................................................9
2.3.4 SetDebounce ...................................................................10
2.3.5 GetDebounce...................................................................10
2.3.6 SetInputInterruptEnable .................................................10
2.3.7 GetInputInterruptEnable .................................................10
2.3.8 SetCounterTriggerType................................................... 11
2.3.9 GetCounterTriggerType .................................................. 11
2.3.10 SetCounterMode..............................................................12
2.3.11 GetCounterMode .............................................................12
2.3.12 SetCounterTimeout .........................................................12
2.3.13 GetCounterTimeout.........................................................13
2.3.14 SetCounterTimeoutBase.................................................13
AR-B104D Software Programming Guide
iii
2.3.15 GetCounterTimeoutBase ................................................13
2.3.16 GetCounterValue .............................................................14
2.3.17 SetCounterTarget ............................................................14
2.3.18 GetCounterTarget............................................................14
2.3.19 WriteOutputChannel........................................................15
2.3.20 ReadOutputChannel........................................................15
2.3.21 SetOutputMode................................................................15
2.3.22 GetOutputMode ...............................................................16
2.3.23 SetPGState.......................................................................16
2.3.24 GetPGState ......................................................................16
2.3.25 SetPGInterruptEnable .....................................................17
2.3.26 GetPGInterruptEnable.....................................................17
2.3.27 SetPGBase.......................................................................17
2.3.28 GetPGBase.......................................................................17
2.3.29 SetPGDuty........................................................................18
2.3.30 GetPGDuty .......................................................................18
2.3.31 SetPGCycle......................................................................19
2.3.32 GetPGCycle......................................................................19
2.3.33 SetPG ...............................................................................19
2.4 Timer ...........................................................................................21
2.4.1 SetTimerInterruptEnable.................................................21
2.4.2 GetTimerInterruptEnable ................................................21
2.4.3 SetTimerBase ..................................................................21
2.4.4 GetTimerBase ..................................................................21
2.4.5 SetTimerValue..................................................................22
2.4.6 GetTimerValue .................................................................22
2.5 CAN-bus......................................................................................23
2.5.1 CanSendMessages..........................................................23
2.5.2 CanGetMessages ............................................................23
2.5.3 CanConfig ........................................................................23
AR-B104D Software Programming Guide
1
Chapter 1 Introduction
AR-B104D is a PCI-104 board which contains 12 general purposed input
channels with pulse counter alternative function, 12 general purposed output
channels with pulse generator alternative function, SRAM with battery supplied,
hardware timer, and CAN-bus interface.
In order to ease the customers operation on AR-B104D, Acrosser provides
device driver, application interface (API), and source code of demo application.
The provided software is available on Windows XP and Linux. The API can be
classified into five catalogs: General usage, SRAM, GPIO, Timer, CANBUS.
The details are described in Chapter 2. All software can be located on the
bundled disc.
There are some limitations on AR-B104D driver:
It can only run on the system with ACPI and APIC enabled.
It has completely tested on Windows XP SP3 with ACPI supported.
Thus, we recommend operating AR-B104D on such environment.
AR-B104D Software Programming Guide
2
Chapter 2 Application Interface
This chapter describes the details of the provided API function. To prevent
using the function under wrong operation system, we add the operation system
prefix in front of function name and separate by underline, e.g.
WXP_RegisterCard or LNX_RegisterCard.
2.1 General Usage
2.1.1 RegisterCard
Description
This function is used to register the selected AR-B104D card. The card has
to be registered by this function before other functions are called.
Syntax
XXX_RegisterCard (i16* CardNum)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
2.1.2 ReleaseCard
Description
This function is used to release the resource of the selected AR-B104D
card.
Syntax
XXX_ReleaseCard (i16 CardNum)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
2.1.3 GetIOBaseAddr
Description
This function is used to get the I/O base address of the selected AR-B104D
card.
Syntax
XXX_GetIOBaseAddr (i16 CardNum, u32* IOBaseAddr)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
IOBaseAddr: The I/O base address of the selected AR-B104D card.
AR-B104D Software Programming Guide
3
2.1.4 GetMemBaseAddr
Description
This function is used to get the SRAM base address of the selected
AR-B104D card.
Syntax
XXX_GetMemBaseAddr (i16 CardNum, u32* MemBaseAddr)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
MemBaseAddr: The SRAM base address of the selected AR-B104D
card.
2.1.5 GetEventBuffer
Description
Get an event from device event queue.
Syntax
XXX_GetEventBuffer (i16 CardNum, event* Event)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
Event: The memory address of buffer to put the event from queue. The
types of event are listed: 0input, 1counter timeout, 2counter
overflow, 3pulse generator finished,4timer finished,5counter
reach to target.
2.1.6 GetEventCounter
Description
Get how many events stayed in device event queue.
Syntax
XXX_GetEventCounter (i16 CardNum, u16* Count)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
Count: The memory address of buffer to put the number of events in
queue.
2.1.7 SetCallbackFunc
Description
Set the callback function pointer.
Syntax
AR-B104D Software Programming Guide
4
XXX_SetCallbackFunc (i16 CardNum, agc_callback_t func)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
func: The callback function pointer.
Example
void IOIST(event Event)
{
switch( Event.Type )
{
case INPUT:
printf("Get input event: Channel %d is %s.\n", Event.Channel,
(Event.Value)? "high":"low");
break;
case COUNTER_TO:
printf("Get counter timeout event: Counter %d, value = %d.\n",
Event.Channel, Event.Value);
break;
case COUNTER_OF:
printf("Get counter overflow event: Counter %d.\n", Event.Channel);
break;
case PG_FIN:
printf("Get pluse generator finish event: PG %d.\n", Event.Channel);
break;
case TIMER_FIN:
printf("Get timer finish event: Timer %d.\n", Event.Channel);
break;
case COUNTER_REACH:
printf("Get counter reach event: Counter %d.\n", Event.Channel,
Event.Value);
}
AR-B104D Software Programming Guide
5
}
----------------------------------------------------------------------------------------------------
Errbox = LNX_RegisterCard( &CardNum );
if(Errbox != 0)
printf(" Register Card Error\n");
if( CardNum == 0xff )
{
printf("[Not Found]\n");
return -1;
}
LNX_SetCallbackFunc(CardNum, &IOIST);
AR-B104D Software Programming Guide
6
2.2 SRAM
2.2.1 ReadMemByte
Description
This function is used to read SRAM data in byte alignment.
Syntax
XXX_ReadMemByte (i16 CardNum, u32 Offset, u8* Buffer)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
Offset: SRAM offset to read.
Buffer: The memory address of buffer to put read SRAM data.
2.2.2 ReadMemWord
Description
This function is used to read SRAM data in word alignment.
Syntax
XXX_ReadMemWord (i16 CardNum, u32 Offset, u16* Buffer)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
Offset: SRAM offset to read (must in word alignment).
Buffer: The memory address of buffer to put read SRAM data.
2.2.3 ReadMemDWord
Description
This function is used to read SRAM data in double word alignment.
Syntax
XXX_ReadMemDword (i16 CardNum, u32 Offset, u32* Buffer)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
Offset: SRAM offset to read (must in double word alignment).
Buffer: The memory address of buffer to put read SRAM data.
2.2.4 WriteMemByte
Description
This function is used to write SRAM data in byte alignment.
Syntax
XXX_WriteMemByte (i16 CardNum, u32 Offset, u8 Value)
AR-B104D Software Programming Guide
7
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
Offset: SRAM offset to read
Value: Value to write to SRAM.
2.2.5 WriteMemWord
Description
This function is used to write SRAM data in word alignment.
Syntax
XXX_WriteMemWord (i16 CardNum, u32 Offset, u16 Value)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
Offset: SRAM offset to read (must in word alignment)
Value: Value to write to SRAM.
2.2.6 WriteMemDWord
Description
This function is used to write SRAM data in double word alignment.
Syntax
XXX_WriteMemDWord (i16 CardNum, u32 Offset, u32 Value)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
Offset: SRAM offset to read (must in double word alignment)
Value: Value to write to SRAM.
2.2.7 SwitchMemMode
Description
This function is used to switch the memory mode.
Syntax
XXX_SwitchMemMode (i16 CardNum, i16 Mode)
Argument
CardNum: The number of AR-B104D. Range from 1~4.
Mode: SRAM Access Mode. 0 indicates “Independent Mode”; 1
indicates “Replicate Mode”.
2.2.8 ReadMemBlock
Description
AR-B104D Software Programming Guide
8
This function is used to read memory with a specified length.
Syntax
XXX_ReadMem_Block (i16 CardNum, u32 Offset, u8* Buffer, u32 Size)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
Offset: SRAM offset to read
Buffer: The start address of memory buffer to put SRAM data.
Size: The memory block size (in byte) to read.
2.2.9 WriteMemBlock
Description
This function is used to write data to memory with a specified length.
Syntax
XXX_WriteMem_Block (i16 CardNum, u32 Offset, u8* Buffer, u32 Size)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
Offset: SRAM offset to write
Buffer: The start address of data buffer to write to SRAM.
Size: The memory block size (in byte) to write.
AR-B104D Software Programming Guide
9
2.3 General Purpose Input/Output
2.3.1 ReadInputChannel
Description
This function is used to read the status of the selected input channel on the
selected AR-104D card.
Syntax
XXX_ReadInputChannel (i16 CardNum, i16 ChannelNum, u8* Value)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: Input channel number. Range from 0~11.
Value: The channel status. 0 indicates input low; 1 indicates input high.
2.3.2 SetInputMode
Description
This function is used to set the input operation mode of the selected input
channel on the selected AR-104D card.
Syntax
XXX_SetInputMode (i16 CardNum, i16 ChannelNum, u8 Mode)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: Input channel number. Range from 0~11.
Mode: The input channel operation mode. 0 indicates general
purposed input; 1 indicates pulse counter.
2.3.3 GetInputMode
Description
This function is used to get the input operation mode of the selected input
channel on the selected AR-104D card.
Syntax
XXX_ GetInputMode (i16 CardNum, i16 ChannelNum, u8* Mode)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: Input channel number. Range from 0~11.
Mode: The input channel operation mode. 0 indicates general
purposed input; 1 indicates pulse counter.
AR-B104D Software Programming Guide
10
2.3.4 SetDebounce
Description
Set the debounce time for the selected channel (in ms).
Syntax
XXX_SetDebounce (i16 CardNum, i16 ChannelNum, u8 Dtime)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: Input channel number. Range from 0~11.
Dtime: The de-bounce time. 0 indicates the debounce function is
disabled; others indicate the debounce time in ms, e.g., 1 means
debounce time is 1 ms.
2.3.5 GetDebounce
Description
Get the debounce time for the selected channel (in ms).
Syntax
XXX_GetDebounce (i16 CardNum, i16 ChannelNum, u8* Dtime)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: Input channel number. Range from 0~11.
Dtime: The memory address to put the debounce time value. 0
indicates the debounce function is disabled; others indicate the
debounce time in ms.
2.3.6 SetInputInterruptEnable
Description
Enable the interrupt of the selected input channel.
Syntax
XXX_SetInputInterruptEnable (i16 CardNum, i16 ChannelNum, u8 Enable)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: Input channel number. Range from 0~11.
Enable: 0 indicates the interrupt of the selected channel is disabled;
others indicate the interrupt of the selected channel is enabled.
2.3.7 GetInputInterruptEnable
AR-B104D Software Programming Guide
11
Description
Get the interrupt enable status of the selected input channel.
Syntax
XXX_GetInputInterruptEnable (i16 CardNum, i16 ChannelNum, u8*
Enable)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: Input channel number. Range from 0~11.
Enable: The memory address of buffer to put the interrupt enable
status of the selected input channel. 0 indicates the interrupt of the
selected channel is disabled; others indicate the interrupt of the
selected channel is enabled.
2.3.8 SetCounterTriggerType
Description
Set the counter trigger type of the selected input channel.
Syntax
XXX_SetCounterTriggerType (i16 CardNum, i16 ChannelNum, u8 Type)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: Input channel number. Range from 0~11.
Type: The counter trigger type of the selected input channel. 0
indicates counter increased at rising edge; 1 indicates counter
increased at falling edge.
2.3.9 GetCounterTriggerType
Description
Get the counter trigger type of the selected input channel.
Syntax
XXX_ GetCounterTriggerType (i16 CardNum, i16 ChannelNum, u8* Type)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: Input channel number. Range from 0~11.
Type: The memory address of buffer to put the counter trigger type of
the selected input channel. 0 indicates counter increased at rising edge;
1 indicates counter increased at falling edge.
AR-B104D Software Programming Guide
12
2.3.10 SetCounterMode
Description
Set the counter value access mode of the selected input channel.
Syntax
XXX_SetCounterMode (i16 CardNum, i16 ChannelNum, u8 Mode)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: Input channel number. Range from 0~11.
Mode: The counter value access mode of the selected input channel. 0
indicates a read action to counter value will not reset the counter; 1
indicates a read action to counter value will reset the counter to zero.
2.3.11 GetCounterMode
Description
Get the counter value access type of the selected input channel.
Syntax
XXX_GetCounterMode (i16 CardNum, i16 ChannelNum, u8* Mode)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: Input channel number. Range from 0~11.
Mode: The memory address of buffer to put the counter value access
mode of the selected input channel. 0 indicates a read action to
counter value will not reset the counter; 1 indicates a read action to
counter value will reset the counter to zero.
2.3.12 SetCounterTimeout
Description
Set the counter timeout value of the selected input channel. The counter
will trigger an interrupt if the status of the selected input channel remains
unchanged beyond the timeout value.
Syntax
XXX_SetCounterTimeout (i16 CardNum, i16 ChannelNum, u16 Value)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: Input channel number. Range from 0~11.
Value: The alarm value of the selected input channel. 0 indicates no
AR-B104D Software Programming Guide
13
interrupt triggered if the selected input channel remains unchanged;
others indicate the timeout value in timeout timebase.
2.3.13 GetCounterTimeout
Description
Get the counter timeout value of the selected input channel.
Syntax
XXX_GetCounterTimeout (i16 CardNum, i16 ChannelNum, u16* Value)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: Input channel number. Range from 0~11.
Value: The memory address of buffer to put the timeout value of the
selected input channel. 0 indicates no interrupt triggered if the selected
input channel remains unchanged; others indicate the timeout value in
timeout timebase.
2.3.14 SetCounterTimeoutBase
Description
Set the counter timeout timebase of the selected input channel.
Syntax
XXX_SetCounterTimeoutBase (i16 CardNum, i16 ChannelNum, u8 Base)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: Input channel number. Range from 0~11.
Base: The counter timeout timebase of the selected input channel. 0
indicates the base is 1 ms; 1 indicates the base is 100 ms.
2.3.15 GetCounterTimeoutBase
Description
Get the counter timeout timebase of the selected input channel.
Syntax
XXX_GetCounterTimeoutBase (i16 CardNum, i16 ChannelNum, u8* Base)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: Input channel number. Range from 0~11.
Base: The memory address of buffer to put the counter timeout
AR-B104D Software Programming Guide
14
timebase of the selected input channel. 0 indicates the base is 1 ms; 1
indicates the base is 100 ms.
2.3.16 GetCounterValue
Description
Get the counter value of the selected input channel.
Syntax
XXX_GetCounterValue (i16 CardNum, i16 ChannelNum, u16* Value)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: Input channel number. Range from 0~11.
Value: The memory address of buffer to put the counter value of the
selected input channel.
2.3.17 SetCounterTarget
Description
Set the counter target value of the selected input channel. An interrupt will
trigger if the counter value is equal to counter target value.
Syntax
XXX_SetCounterTarget (i16 CardNum, i16 ChannelNum, u16 Value)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: Input channel number. Range from 0~11.
Value: The counter target value of the selected input channel.
2.3.18 GetCounterTarget
Description
Get the counter target value of the selected input channel. An interrupt will
trigger if the counter value is equal to counter target value.
Syntax
XXX_GetCounterTarget (i16 CardNum, i16 ChannelNum, u16* Value)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: Input channel number. Range from 0~11.
Value: The memory address of buffer to put the counter target value of
the selected input channel.
AR-B104D Software Programming Guide
15
2.3.19 WriteOutputChannel
Description
Write the status of the selected output channel on the selected AR-104D
card.
Syntax
XXX_WriteOutputChannel (i16 CardNum, i16 ChannelNum, u8 Value)
Argument
CardNum: The number of AR-B104D. Range from 1~4.
ChannelNum: Output channel number. Range from 0~11.
Value: The channel status. 0 indicates output low; 1 indicates output
high.
2.3.20 ReadOutputChannel
Description
Read the status of the selected output channel on the selected AR-104D
card.
Syntax
XXX_ReadOutputChannel (i16 CardNum, i16 ChannelNum, u8* Value)
Argument
CardNum: The number of AR-B104D. Range from 1~4.
ChannelNum: Output channel number. Range from 0~11.
Value: The channel status. 0 indicates output low; 1 indicates output
high.
2.3.21 SetOutputMode
Description
Set the output operation mode of the selected output channel.
Syntax
XXX_SetOutputMode (i16 CardNum, i16 ChannelNum, u8 Mode)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: Output channel number. Range from 0~11.
Mode: The output operation type of the selected output channel. 0
indicates the output channel works as a general-purpose output; 1
indicates the output channel works as a pulse generator.
AR-B104D Software Programming Guide
16
2.3.22 GetOutputMode
Description
Get the output operation mode of the selected output channel.
Syntax
XXX_GetOutputMode (i16 CardNum, i16 ChannelNum, u8* Mode)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: output channel number. Range from 0~11.
Mode: The memory address of buffer to put the output operation mode
of the selected output channel. 0 indicates the output channel works as
a general-purpose output; 1 indicates the output channel works as a
pulse generator.
2.3.23 SetPGState
Description
Set the pulse generator state of the selected output channel.
Syntax
XXX_SetPGState (i16 CardNum, i16 ChannelNum, u8 State)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: Output channel number. Range from 0~11.
State: The pulse generator state of the selected output channel. 0
indicates the related pulse generator is running; 1 indicates the related
pulse generator is stopped.
2.3.24 GetPGState
Description
Get the pulse generator state of the selected output channel.
Syntax
XXX_SetPGState (i16 CardNum, i16 ChannelNum, u8* State)
Argument
CardNum: The card number of AR-B104D. Range from 1~4.
ChannelNum: output channel number. Range from 0~11.
State: The memory address of buffer to put the pulse generator state of
the selected output channel. 0 indicates the related pulse generator is
running; 1 indicates the related pulse generator is stopped.
  • Page 1 1
  • Page 2 2
  • Page 3 3
  • Page 4 4
  • Page 5 5
  • Page 6 6
  • Page 7 7
  • Page 8 8
  • Page 9 9
  • Page 10 10
  • Page 11 11
  • Page 12 12
  • Page 13 13
  • Page 14 14
  • Page 15 15
  • Page 16 16
  • Page 17 17
  • Page 18 18
  • Page 19 19
  • Page 20 20
  • Page 21 21
  • Page 22 22
  • Page 23 23
  • Page 24 24
  • Page 25 25
  • Page 26 26
  • Page 27 27

Acrosser Technology AR-B104D Owner's manual

Type
Owner's manual

Acrosser Technology AR-B104D is a PCI-104 board that offers a range of capabilities for industrial automation and data acquisition applications. It features 12 general-purpose input channels with pulse counter functionality, 12 general-purpose output channels with pulse generator functionality, SRAM with battery backup, a hardware timer, and a CAN-bus interface. With its versatility, the AR-B104D can be used for various tasks, including monitoring sensor inputs, generating control signals, storing critical data, and communicating with other devices over a CAN network.

Ask a question and I''ll find the answer in the document

Finding information in a document is now easier with AI