Commands
DGS Commands
C6000 Read
Reads transactions from C6000 fuel card and saves them to DGS database
Parameter | Description |
Address | IP address of device |
Debug | Outputs a message to event log with full exchange between DGS.net and the fuel card |
Password | Password required to access fuel card |
PreformClear | Will clear transaction data after read |
Table | Table DGS is to write data to |
Username | Username required to access fuel card |
Canfor Change Read
Pluggin made for canfor to track changes in a file
Parameter | Description |
DataFile | Datafile to scan |
Filter | Lines in file to watch |
Table | Table DGS is to write data too |
Canfor JDE Transfer
Pluggin made for canfor to transfer production from DGS to JDE
Parameter | Description |
ConnectionString | Connection String to JDE database |
Debug | Output debug information when attempting to troubleshoot |
Schema | Schema where JDE tables exists that DGS is to write to |
Canfor Product Transfer
Pluggin made for canfor to transfer production from DGS to mills
Parameter | Description |
ConnectionString | Connection String to mills database |
Debug | Output debug information when attempting to troubleshoot |
Canfor Run Sync
Pluggin made for canfor to sync RunID with mills runs on enterprise DGS
Parameter | Description |
Debug | Output debug information when attempting to troubleshoot |
LocalConnectionString | Connection String to the Enterprise database |
MillsConnectionString | Connection String to Mills database |
RemoteConnectionString | Connection String to DGS Site database |
Coe Lathe Magic
Attempts to review the all the updates from the coe lathe and split them into runs even when run/shift changes do not happen at the machine
Parameter | Description |
RawTableBlocks | Raw Block table from Coe Lathe Read command |
RawTableCoreDrop | Raw Core Drop table from Coe Lathe Read command |
RawTableStats | Raw Stats table from Coe Lathe Read command |
RunStationID | PLC station ID to base the run splits off of |
TableBlocks | Table to output block data too |
TableCoreDrop | Table to output Core Drop data too |
TableStats | Table to output Stats data too |
Coe Lathe Read
Reads in files created but the Coe Lathe for a shift based on file creation time and name
Parameter | Description |
FileDirectory | Location of file share that contains Coe Lathe report files |
TableBlocks | Table to output block data too |
TableCoreDrop | Table to output Core Drop data too |
TableStats | Table to output Stats data too |
Comact Read
Read Comact files from a FTP site.
Parameter | Description |
BoardCountColumn | Column where board count is. Used find the start of the board data |
DataFile | Start of the file name ex. if you had the file ddm20140505A.cvs you would want ddm |
FTPAddress (P3) | IP Address of the comact ftp server computer |
FTPInitialDirectory (P7) | Location where the shift files are located on the FTP server |
FTPPassword (P6) | Password for the FTP site |
FTPPort (P4) | FTP server port. 21 is the standard port |
FTPUserName (P5) | Username for the FTP Site |
MachineType (P1) | What type of machine file should DGS expect |
ShiftOrder (P2) | Used to aling DGS shifts with comact shifts so B,A,C would be first shift 01=B, 02=A, 03=C |
FilterToShift | Scans time in file and makes sure it is part of shift |
Table | Table DGS is to write data too |
CSV Read
Reads in CSV File
Parameter | Description |
DateFile | CSV File to open when in single file mode |
DateFormat | Date format for Multiple DateSE mode |
FileType | Single or Multiple DateSE file mode |
FirstRowHeaders | First row contains column headers |
MultipleFolder | File location for Multiple DateSE file mode |
Separator | Column delimiter |
AddShiftAndRun | Adds shift and run data to output data |
ClearTable | Clears table before writing in new data |
Filer | A filter that can be put in place to over write data |
InsertColDupeTest | Will update rows based on a key |
MapByColIndex | Uses column name instead of column index when writting in data |
OverrideConnectionWrite | Writes to a differnt DGS databse |
StorageActionNet | How DB Write should handle the data table |
Table | Table DGS is to write data too |
CSV Write
Writes a data table to a CSV File
Parameter | Description |
FileName | Output file to be written |
NewLineType | New line type. CrLf is windows standard Lf is Unix standard |
Table | Datatable to be writtin out. This table can be pulled in by any command that can set StorageActionNet to No Storage. DBRead is one of these commands |
WriteHeaders | First row is column |
DB Read
Runs a query on a database and saves it into the database
Parameter | Description |
AddDatatables | If StorageActionNet is set to no storage and Add Datatables is set to true the table can be used as a variable |
AddShiftAndRun | Adds a shift and run number column to the data table before storing it into the database |
ClearTable | Wipes the content of the database table before writing in collected data |
ConnectionString | Connection String to database that data will be read from |
Filter | Filters data returned when StorageActionNet is set to Overwrite with a sql statement. Example: SiteCode = 'HOU' or Length = 16 |
GetSchema | Grabs the schema of the incoming data used to build better tables. Has problem with some queries |
InsertColDupeTest | Updates instead of inserting a new row based on a key should be used with Storage Action Append Update |
MapByColIndex | If true will use column indexes to map data else it will use column names to map data handy if you want to add extra columns to the table |
OverrideConnectionWrite | Output data to a differnt MS SQL database |
Provider | Type of database connection to be used oleDB, ODBC, SQL |
SQLQuery | SQL Query to be run on the database that will return a table |
StorageActionNet | How DB Write should handle the data table |
Table | Table DGS is to write data too |
DB Write
Writes data table to database. Preforms most of the database writing in DGS.
Parameter | Description |
AddShiftAndRun | Adds a shift and run number column to the data table before storing it into the database |
Filter | Filters data returned when StorageActionNet is set to Overwrite allows for better updates of rows |
InsertColDupeTest | Updates instead of inserting a new row based on a key should be used with Storage Action Append Update |
MapByColIndex | If true will use column indexes to map data else it will use column names to map data handy if you want to add extra columns to the table |
OverrideConnectionWrite | Output data to a differnt MS SQL database |
StoageAction | How DB Write should handle the data table |
Table | Table DGS is to write data too |
Delay
Pauses the current command thread for x ms. Can be used to put a delay in between execution of commands.
Parameter | Description |
Delay | Delay in ms 1000 equals 1 second |
DGS Exception Report
To be run at the end of a command block. Will write each error and the command that created the error to a table that can later be used in a report.
Parameter | Description |
TableName | Table for output. Will required the following columns StationID INT , CommandNumber INT, Message VARCHAR(MAX), ExpTS DateTime |
File Copy
Copies a file from on location to another will overwrite a file if it alread exists
Parameter | Description |
FileFrom (P1) | File to be copied |
FileTo (P2) | File Location to copy too |
MaxSize | Max file size in KB -1 to disable the files size check |
File Delete
Deletes a file based on the Delete Parameter if it is set to True then the Data File will be deleted
Parameter | Description |
DataFile | File to delete |
Delete | Can use a parameter to determain if file should be deleted |
File Exists
Checks to see if a file exists and will set a variable based on the resault
Parameter | Description |
DataFile | File to check if exists |
Variable | Output Variable to be set |
John Deere Read
Parameter | Description |
Address | |
Password | |
Table | |
Username | |
UseProxy | |
LumberSCAN Read
Parameter | Description |
DataFile | |
MatrixFolder | |
Mode | |
SetupFile | |
Table | |
TablePKG | |
Lumber Track Write
Parameter | Description |
ConnectionString | |
FileDirectory | |
FileHeader | |
From | |
Recipients | |
SmtpServer | |
Split | |
SQLQuery | |
Subject | |
Metrigard Read
Parameter | Description |
DataFile | |
FileType | |
Lookup_Table | |
RunStationID | |
Table | |
Mikrotik Read
Reads in network usage from a microtik RouterOS router. IP→Accounting must be activated before collection can work. Every read clears the data so will only work if DGS is the only thing reading from the usage report.
Parameter | Description |
RouterIP | IP Address that data is to be tracked from |
Table | Table DGS is to write data too |
Neson Read
Parameter | Description |
FileDirectory | |
TableBoards | |
TableLogByDiameter | |
TableLogsByLength | |
TableSummary | |
TableSweep | |
NMI Read
Pulls in moisture data from a NMI controller
Parameter | Description |
Debug | Display debug infor for trouble shooting a connection |
IPAddress | IP Address of controller |
Mode | What type of data is to be pulled |
ReportReads | How many reports should be attempted to be pulled in one read only valaid for Block mode |
TableBlocks | Table DGS is to write data too |
TableShift | Table DGS is to write data too |
NMI Transverse Read
Parameter | Description |
ConnectionString | |
Mode | |
OverrideConnectionWrite | |
Table | |
Perceptron Read
Pulls in data from perceptron
Parameter | Description |
DataFile | |
FileType | |
Offset | |
Rollover | |
ShiftIDOverride | |
StartTimeFudge | |
Table | Table DGS is to write data too |
Planer Run
Reads piece by piece planer data from a table, determines the runs and inserts the runs into a table. This will only insert run info, not data. The data will have to be inserted via stored procedure after this program has run.
Parameter | Description |
ReadTimestampColumn | The name of the column that contains timestamp in the read table |
ReadThicknessColumn | The name of the column that contains thickness in the read table |
ReadWidthColumn | The name of the column that contains width in the read table |
ReadLengthColumn | The name of the column that contains length in the read table |
ReadTable | The name of the table DGS will be reading piece by piece data from |
ReadFilter | SQL where statement used to filter data in the read table (Example: “Sorternumber = 1 AND Destination = 1”) |
RunRows | Row threshold for runs, for example if RunRows is 25 and we get 25 2x6x16 in a row it will be considered a new run |
WriteTable | The name of the table to write the runs to |
WriteThicknessColumn | The name of the column that contains thickness in the write table |
WriteWidthColumn | The name of the column that contains width in the write table |
WriteLengthColumn | The name of the column that contains length in the write table |
WriteRunStartColumn | The name of the column that contains the run start time in the write table |
WriteRunEndColumn | The name of the column that contains the run end time in the write table |
PLC Buffer
PLC Downtime Buffer
PLC Prod Read
PLC Raw Read
PLC Raw String Read
PLC Recipe Write
PLC Set Horns
PLC Set Shifts
PLC Set Time
PLC Write
Query
Read Short Cut
Reads file path from a windows short cut
Parameter | Description |
DataFile | Shortcut file too read |
Variable | DGS Variable to write file path into |
Report Mailer
Emails or Prints reports based on commands parameters.
Schedule Parameter | Description |
SchdType | Can be Daily, Shift or Table. Daily sends at a specified time each day, Shift sends at the end of a shift and Table sends based on a table |
When | Used by Daily option for time to send |
MtoF | Used by Daily and Shift. Will send on between Monday and Friday but not on the weekend |
MtoS | Used by Daily and Shift. Will send on between Monday and Saturday but not Sunday |
PrevDay | Used by Daily. Will send the previous day to the report for the range |
Delay | Used by Shift. Time in minutes to wait after a shift is complete before sending |
TableName | Used by Table. Name of table pulled in from DBRead. Look at the Report table format section bellow for details |
Parameter | Description |
ReportID | ID of report to be mailed |
ReportName | Used in the subject when sending email |
FileName | Change the default Filename available in DGS.net V 1.01.48 |
Excel | Will send Excel file instead of PDF DGS.net V 1.01.48 |
P2 | Parameter 2 or {2} in the reports |
P3 | Parameter 3 or {3} in the reports |
P4 | Parameter 4 or {4} in the reports |
P5 | Parameter 5 or {5} in the reports |
P6 | Parameter 6 or {6} in the reports |
P7 | Parameter 7 or {7} in the reports |
P8 | Parameter 8 or {8} in the reports |
P9 | Parameter 9 or {9} in the reports |
Email Parameter | Description |
From | Email that will appear as the sender of the report |
To | List of users that will be receiving the email coma delimited |
SmtpServer | The IP or URL of the SMTP Server that DGS should use to send out the messages |
Port | The port DGS should use to connect to the SMTP Server |
Username | If SMTP Server requires a login to send messages this should be filled in |
Password | If SMTP Server requires a login to send messages this should be filled in |
UseSSL | Will use SSL when connecting to the SMTP server |
If passing in a table here is a list of columns that DGS will look at to send. Will have to bring in all columns if wanting to track success of sent email as DGS will write back null in missing columns. DBWrite is used to update database.
Report Table Format
Column | Description |
ReportID | INT Required, ID of report to be mailed |
ReportName | VARCHAR Required, Name for used in subject |
SmtpServer | VARCHAR Required, Mail server |
Port | INT Required, Port for Mail Server |
FromAddress | VARCHAR Required, From address to be used for the email |
ToAddress | VARCHAR Required, List of users that will be receiving the email coma delimited |
Sent | BIT Required, Set to true if successfully sent email false if failed to send |
Modified | DATETIME Required, Set to the time when record was processed in DGS |
P0 | FLOAT Required, Parameter 0 or {0} in the reports |
P1 | FLOAT Required, Parameter 1 or {1} in the reports |
P2 | VARCHAR Optional, Parameter 2 or {2} in the reports |
P3 | VARCHAR Optional, Parameter 3 or {3} in the reports |
P4 | VARCHAR Optional, Parameter 4 or {4} in the reports |
P5 | VARCHAR Optional, Parameter 5 or {5} in the reports |
P6 | VARCHAR Optional, Parameter 6 or {6} in the reports |
P7 | VARCHAR Optional, Parameter 7 or {7} in the reports |
P8 | VARCHAR Optional, Parameter 8 or {8} in the reports |
P9 | VARCHAR Optional, Parameter 9 or {9} in the reports |
Excel | BIT Optional, Will send report as Excel instead of PDF |
FileName | VARCHAR Optional, Allows for overriding default file name of Report.pdf or Report.xls |
Pulls in an RSS feed into a data table in the DGS database. Can be used for news feeds or other applications that create an RSS feed
Parameter | Description |
CleanHTML | if true will attempt too remove any HTML code from the feed |
RSSURL | URL of the RSS feed |
Table | Table DGS is to write data too |
Run Batch
Will start up a program or batch file.
Parameter | Description |
TargetBatch | Program / File to be run |
Run Function
Allows for queing of DGS Functions(groups of commands). Can be used in scans to increase the one command limit.
Parameter | Description |
CheckForDups | If true will check the que to make sure function with same function shift and run are not already in the system |
Function | The group of commands that are going to be run. Ex. Button 1, Gather Data, Final Read |
Que | Will only Queue if Que is true |
Runnum | Run number that function will be sent |
Shiftnum | Shift that function will be sent |
When | Can set a function to run at a certian date/stime |
Samuel Read
Send Email
Sends out an email threw a SMTP mail server. Ussally used to send out alert message.
Parameter | Description |
From | Email address that message will be from |
Message | Body of message |
Recipients | List of email address to recive the email |
Send | |
SmtpServer | Address to the SMTP server |
Subject | Message Subject line |
Table | Required table columns are “To”, “From”, “Subject”, and “Body” |
Sports Read
Pulls in sports stats from the web. DGS requires internet access for this to work.
Parameter | Description |
SportLeague | Supported Leagues are currently MLB/NBA/NFL/NHL |
Table | Table DGS is to write data too |
Ventek MySQL Read
Ventek Run Read
Ventek Sequoia Read
Vision Link Asset Read
Vision Link Read
VWScript
Runs a script threw the VW Scripting Engine that allows for some more complex scheduling / collection options that can be handled in the standard DGS command step format. Any variables created in the script will be avaible to other commands.
Parameter | Description |
Script | The VW Script to be run |
VWSupport
Sends out an email to Valley West Controls used to track status of DGS. Allow for support team to react faster to DGS being down.
Parameter | Description |
From | Email address that will be used to send the support message site@company.com |
SmtpServer | SMTP server that DGS.net can use to send out messages |
Woodlands Read
PLC Address
DGS.net currently only supports using it's built in drivers for connecting to a PLC. It will look at the Vendor and VendorModel properties of a command to determine the type of PLC then the Item to locate the block of data to return.
Server;;Item
VW;;[IP|Path|Timeout]PLC_Tag,L(Length)
Examples
Control Logix
Variables
Here are a list of avaible variables in the commands. To used in a string put %variable%
Variable | Description |
D | Shift date in single quotes ex. '05/31/99' |
FR | 1 on final read, 0 the rest of the time |
R | Run number that command has been run with |
RunEnd | Run end |
RunStart | Run start |
S | Shift number that command has been run with |
ShiftEnd | Shift end in format MM/dd/yyyy h:mm:ss tt |
ShiftEndMySql | Shift end in format yyyy-MM-dd HH:mm:ss |
ShiftStart | Shift start in format MM/dd/yyyy h:mm:ss tt |
ShiftStartMySql | Shift start in format yyyy-MM-dd HH:mm:ss |
StationID | Station ID of current running station (DGS.Net V1.01.34) |
T | Schedule Code for the scheudle the station is part of |
VendorFile | Vender file saved in bManager_Runhistory |
VendorShift | Vender Shift saved in bManager_Runhistory |
VendorRun | Vender Run saved in bManager_Runhistory |