---
title: "system.mes.getTagCollectorValues"
id: "system-mes-gettagcollectorvalues"
project: "MES User Manual"
url: "https://docs.sepasoft.com/articles/user-manual/system-mes-gettagcollectorvalues"
updated: 2026-07-31T14:54:08Z
---

# system\.mes\.getTagCollectorValues

**Sepasoft MES Module Suite**

### system.mes.getTagCollectorValues(equipmentPath, collectorType, key, beginDateTime, endDateTime)

Return MES tag collector values for a given date range.

Syntax

**system.mes.getTagCollectorValues(equipmentPath, collectorType, key, beginDateTime, endDateTime)**

Parameters

String **equipmentPath** - The path from the production model to the desired equipment.

String **collectorType** - The name of the tag collector type.

String **key** - Where there are multiple instances of a tag collector type, this specifies which one to use. For example, there can be multiple MES counters for the "Equipment Count" tag collector type. If not needed, pass an empty string. In other words it is the name of the MES counter or the name of the Additional Factor.

Date **beginDateTime** - The starting date of the values returned.

Date **endDateTime** - The ending date of the values returned.

Returns

Dataset values - A Dataset containing columns for the timestamps and the values within the specified date range.

Scope

All

Code Example


```python
date = system.date.getDate(2017, 2, 20)
beginDateTime = system.date.setTime(date, 15, 13, 31)
endDateTime = system.date.now()
equipmentPath = '[global]\Enterprise\San Marcos\MP Rotator\MP Rotator 1'
collectorType = 'Equipment Mode'
key = ''
data = system.mes.getTagCollectorValues(equipmentPath, collectorType, key, beginDateTime, endDateTime)
for row in range(data.rowCount):
   for col in range(data.columnCount):
      print data.getValueAt(row, col)
```

Output

Code

```
Mon Mar 20 15:13:31 PDT 2017
2
Mon Mar 20 15:13:31 PDT 2017
3

```


**Sepasoft MES Module Suite**