[Logo] Mango Community
  [Search] Search   [Recent Topics] Recent Topics   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Text file data point  XML
Forum Index » How-To
Author Message
profnova

Initiate

Joined: 17/01/2010 16:13:53
Messages: 6
Offline

Hi,

is it possible somehow to create a texte file (csv for example) as
data source? Can someone give me ideas? Thanks...
mlohbihler

Master
[Avatar]

Joined: 01/03/2007 22:48:52
Messages: 1850
Offline

Currently, no. But it is something that is being considered. You'd just want to be able to do a browse/upload of a file?

Best regards,
Matthew Lohbihler
mkhadem

Initiate

Joined: 11/03/2011 06:49:36
Messages: 5
Offline

Hi,

I need this functinality too. I like to setup a schedule for example every five minutes read the file (CSV format) from ftp server and link each value to a data point. Your help is appreciated.
Similar to SQL data sources

Thanks
Mo
oja

Initiate

Joined: 07/10/2010 03:49:54
Messages: 40
Offline

Maybe the way exists.

You can use Javascript with imported FileInputStream and FileOutputStream. Or, you can create JAVA library for CSV file controlling and import to Javascript in datapoint.
I am using this for serial communication with unsuported protocols etc. Siemens Elan protocol.

Please, describe your requirements for CSV access.

Oja
mkhadem

Initiate

Joined: 11/03/2011 06:49:36
Messages: 5
Offline

Hi,

I can use the event handler and choose the type as Process and run the script (e.g. JavaScript) to read the CSV file and write it into a database (Derby, MySQL, etc).

The rest is easy to setup a SQL data source and map the table columns into data points. I appreciate if you can suggest an effective way to write the script to read the file and write it into DB.

Thanks
Mo
mlohbihler

Master
[Avatar]

Joined: 01/03/2007 22:48:52
Messages: 1850
Offline

The most effective way would be to create a data source that can read CSV text files, similar to how the point data upload module works in M2M2.

Best regards,
Matthew Lohbihler
mkhadem

Initiate

Joined: 11/03/2011 06:49:36
Messages: 5
Offline

Thx Matthew,

Is there any plan to integrate it in M2M2?

Mo
mlohbihler

Master
[Avatar]

Joined: 01/03/2007 22:48:52
Messages: 1850
Offline

You mean in M2M? No, there are no plans to port it over.

Best regards,
Matthew Lohbihler
pbisiac

Initiate

Joined: 31/05/2013 13:26:35
Messages: 5
Offline

oja wrote:Maybe the way exists.

You can use Javascript with imported FileInputStream and FileOutputStream. Or, you can create JAVA library for CSV file controlling and import to Javascript in datapoint.
I am using this for serial communication with unsuported protocols etc. Siemens Elan protocol.

Please, describe your requirements for CSV access.

Oja

Hi, that's exactly what I need
I wish to read some datapoints BOTH via Modbus/TCP when my device is online, and to read same datapoints stored locally in devices filesystem and uploaded to my server via some backup connection, in roder not to lose recordings on unreliable networks. Could you please explain better how to implement such a Javascript task and to integrate into Mango, or address me to a working example ?
 
Forum Index » How-To
Go to:   
Powered by JForum 2.1.9 © JForum Team