Channel New Features Request


jbotas

Recommended Posts

This is actually more challenging than you would expect.  We export channels using CSV so you can use Excel to make changes, but you can't put script into CSV because of the possibility of carriage returns and commas in the script.  So a choice was made to not export the script so that Excel could be used.

 

Note, however, that if you import channels and the channel already exists with an event, the channel is updated but the event is not cleared out.  This means that you can export channels, make changes, even add new channels, and then import and the event code is not lost.  This isn't as good as being able to export the script too I know, but its a compromise to allow you to use Excel.  We are certainly open to other suggestions.

Link to comment
Share on other sites

Thanks for the answer.

In a project that I made a years ago i needed to do something like this.

What i did is to change the "Carriage Return" to a new pattern "%NL%". So that when i exported the text

 

HELLO

WORLD

 

it will appear

 

HELLO%NL%WORLD

 

In import i would do the reverse operation.

 

In this case because we want to edit the pattern could be more simple, and a pattern that in not permitted in script, like for example "_%".

Its a work around but works.

 

Other suggestion is to use a different format for the file exported, that you can chose in export/import dialog,  that can be edited in excel.

Link to comment
Share on other sites

Yes, you can certainly do that, and \n for newline, \r for carriage return, etc is a standard format.  The problem is that Excel isn't going to process that so opening the script in excel is going to look weird.  But perhaps that is not an issue and that being able to at least copy script from channel to channel in excel even if editing it is not convenient is better?

Link to comment
Share on other sites

I think if you have the possibility to import and export with this work around, is always better than not having it.

 

With this I can edit the scripts by copy paste in excel.

 

And if i want, i can use the excel formulas or macros to create a table with the alarms or channels with the correct format, and then copy everything to a file and import to daqfactory.

I already do this with other programs where i have a database in excel for channels and alarms, and then by macros i export the configuration to files and then import.

 

As i said it would be really good to also have this in the import and export of alarms.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.