PreviousNext
Help > Development > Programs and Data Queues > Using DATA QUEUES > Reading from a FIFO or LIFO data queue
Reading from a FIFO or LIFO data queue

 

Read the data queue entry with function HReadSeek.

HReadSeek(DTAQ_FIFO,TIMEOUT, "000000")

When TIMEOUT key field is 0, the system returns immediately the value, or set HOut to True is the data queue is empty.

Set TIMEOUT key value to a number of seconds to wait before to exit with HOut = True.

 

Example:

WaitStrg is string

 

WaitStrg = timeout

HReadSeek(DTAQ_FIFO,TIMEOUT, WaitStrg)

IF HOut = True THEN

 Info("DataQueue is empty !")

ELSE

 // Value is here

 data_lue=DTAQ_FIFO.DATA

END