A few questions about sequencer

Gregor Gominšek

Posted on 01.02.2017 10:54

Hello

I am working on building a setup and sequence that will be used in production and as such need to be fully automated except, for some user inputs for every piece of equipment.

I have almost everything working.

What i am strugling with is:

- Is it possible to use a digital output inside sequence?

- I need to store measured file and export an excel file each time with a diffrent name(both measurement and excel will have the same name). Now for storing measurement i use in sequence normal storing block and rename last saved data file with user input block, which works fine for measurement, but for excel file i export with a template and everytime i get the same file name.

Is there any way i can name the exported excel file with user input inside sequence? Or preferably to even use just 1 user input to name both measurement and excel file.

Currently thinking about making a program and runing it with open file block. It will check if measurement file and excel file were generated. Ask user for input and then copy, rename new files and delete old files.

DEWESoft Support
Technical support
Posted on 06.02.2017 11:35

Hi,

you can use digital outs with the calculation block. Just assign a value to the digital out channel like you would to a sequencer/global variable.

The Excel export using a template is a bit more tricky. If you were using the regular Excel export (without the template), the Excel file would have the same name as the data file that you've just created. That way you could iterate file names or use forms (user inputs) for the names.

We currently don't have a way for you to choose a name that your Excel file will have when exporting through a template. The solution that you suggested should work. You can generate batch files and run them with the sequencer. You could also use the "File Manager" block to rename and copy the files. I believe that we've added the ability to use variables in the latest SP10. Just use 'single quotation marks' around your sequencer variables.

I've attached a sequence/setup file which will change the value of the DO channel and report it in the main toolbar. Let me know if you'll need any more help with your configuration.

Gregor Gominšek

Posted on 09.02.2017 06:19

Hello

Thank you for reply.

About DO i found out.

About SP 10 i didnt even notice you offer testing releases.

And as far files and templates goes i use a .bat file to close the excel since its easier then doing it in python and small python program that moves and renames data and excel file and works flawlessly.

Rick Emerling

Posted on 15.02.2017 19:11

Gregor,

I build a file name for the dxd file in the sequencer, assigning it to a global variable. The global variable is exported out to the excel template in the DataInfo sheet.

When you call startRecording, use variables to create the dxd file name. Example: 'VARIABLE8' SN 'SNUM' 'Report Title' ('Date').dxd

The values in single quotes are built before startRecording block. For example, date and time of test gets built as a string and stuffed into global variable 'Date'. Use a calculation block and set 'Date' = SysDateTime("mm-dd-yy HHMM")

So the data file gets a unique name in each test that I run, and that name shows up in the "DataInfo" tab in the exported worksheet. Example:

C:\Users\Public\Documents\DEWESoft\Data\CB48080-001 SN 2222 Op 3.1 (07-20-16 1140).dxd

Having that info in the exported worksheet allows you to use formulas in other cells (make these part of the template) to pull out the path, create a unique file name to save the excel files, etc.

From the dxd file name, formulas in the excel template can create excel file names to be used to save the worksheet,

example: CB48080-001 SN 2222 Op3.1 (07-20-16 1140).xlsx

I know you already created a batch file that works. My approach was to create excel VBA macros that the operator uses to save the data file. That's nice because the excel file opens up with a name like temp0000.xlsx, but when the user clicks the "save file" button on the Results tab, the macro uses the value CB48080-001 SN 2222 Op3.1 (07-20-16 1140).xlsx as the file name. We even use the serial number to save data for each unit under a unique folder, like:

C:\DEWESoft\Exports\2222\CB48080-001 SN 2222 Op3.1 (07-20-16 1140).xlsx


Cheers!

Login to reply to this topic. If you don't have account yet, you can signup for free account .