You are on page 1of 13

VCDScripter manual (Version 1.

1)
Author: hadez16, 02 Nov 2018
Contact: vcdscripter@vcds.de

Content
VCDScripter manual (Version 1.1) ........................................................................................................... 1
1) Introduction ................................................................................................................................. 2
2) Overview...................................................................................................................................... 2
3) Script commands ......................................................................................................................... 3
StartVCDS() ................................................................................................................................. 3
CreateAdpMap("…", "…") ......................................................................................................... 3
CreateAutoscan("…") ............................................................................................................... 3
CheckForUnits("…", 0/1)....................................................................................................... 4
OpenUnit("…") ............................................................................................................................ 4
TestComponent("…", 0/1)....................................................................................................... 4
TestPartNo("…", 0/1) ............................................................................................................. 5
TestAdpChannel("…","…", 0/1)............................................................................................ 5
ClearDTCs() ................................................................................................................................. 6
LoginToUnit("…") ...................................................................................................................... 6
ChangeCoding("…", "…") ......................................................................................................... 6
ChangeCodingInSub("…", "…", "…") ................................................................................... 7
ChangeAdpChannel("…", "…") ................................................................................................ 7
CloseUnit() ................................................................................................................................. 8
ClearAllDTCs() .......................................................................................................................... 8
Scope of commands ........................................................................................................................ 9
Comments ....................................................................................................................................... 9
4) Save & Sealing of a script ............................................................................................................ 9
5) Compile scripts .......................................................................................................................... 10
6) Run script ................................................................................................................................... 11
7) Limitations and Notes................................................................................................................ 12
a) Limitations ............................................................................................................................. 12
b) Error handling ........................................................................................................................ 12
8) Example: Trailer hitch retrofit MQB Facelift ............................................................................. 13
1) Introduction

The application "VCDScripter" is a tool for automating steps in Ross-Tech (LLC) VCDS® (later on
mentioned as "VCDS"). For this purpose a script language is introduced that automates user steps
within the VCDS application.

The author is neither affiliated with Ross-Tech (LLC), nor focusing any commercial intention. As being
a private project the quality of VCDScripter may not be related to any quality of Ross-Tech VCDS®.

2) Overview

1) Text area for programming the script itself


2) Text boxes which text gets saved and opened with a script again
a. Text box for author name/title/nickname
b. Automatic timestamp of the last changed date/time
c. Text box for any comment
d. Checksum in case of the sealing of the script
3) Menu options: New, Open
a. New: empties all input
b. Open: Open file dialog for opening saved script files (.vsf format)
c. Save: Save file dialog for saving a script in .vsf file format
d. Examples: Opens a menu for inserting language-specific script examples
4) Options for starting or distributing scripts
a. Renew debug logs: saves the current AdpLog and CodingLog with a VCDScripter suffix
in order to have new debug logs when running the script

b. Compile script: Saves the script as an independent .exe executable file that can be
shared with others. It can be executed without having VCDScripter on your PC
c. Run script: Starts the script immediately

3) Script commands

Each command should always be terminated with a line break.

StartVCDS()
Parameters: None

Mandatory command at the beginning of every script.

Starts VCDS. On script start VCDS should be closed! Otherwise you’ll get an error message.

CreateAdpMap("…", "…")
Parameter:

Control unit address


Control unit login

Creates an CSV adaptation map of the given unit with


the given login code.

Hint: In general it is not necessary to provide a security access for UDS units.

Example: CreateAdpMap("10", "")

This command is only allowed outside of any control unit script flow.

CreateAutoscan("…")
Parameter:

title (License plate text)

Creates an Auto Scan. The title parameter is optional and can be left empty. The default path for the
created Auto Scan is the Logs directory in the VCDS folder path.

Examle: CreateAutoscan("SCAN_BEFORE_TSR_CODING")

This command is only allowed outside of any control unit script flow.
CheckForUnits("…", 0/1)
Parameters:

Comma-separated list of control unit addresses


0 or 1
 0: skips non-installed units in the script flow
 1: Cancels the whole script with an error message if one
unit is not found as installed

This command is allowed after starting VCDS. It checks for installed units before connecting to any
unit.

Example: CheckForUnits("13,A5,4B", 1)

Explanation: Checks if unit 13, A5 and 4B is installed. Cancels script execution in case that any unit is
not found.

Example: CheckForUnits("13,3C”, 0)

Explanation: Checks if unit 13 and 3C is installed. In the further


script execution flow units are skipped that are not installed. In
this example the red marked script block will be skipped in a
whole because unit 13 is not installed.

OpenUnit("…")
Parameters:

Control unit address

Opens a control unit in order to perform actions with it.

Example: OpenUnit("10")

Explanation: Opens the parking aid control unit with address 10

TestComponent("…", 0/1)
Parameters:

string
0 or 1
 0: skips all descendant commands for this unit and continues
with the script flow
 1: Cancels the whole script with an error message if the
string could not be found

Checks for the existence of the string in the "Component” field within a control unit.

Example: TestComponent("PDC 8 Kanal", 0)


Explanation: Checks for the string "PDC 8 Kanal" in the Component field. Skips all following
commands for this unit and continues with the script flow if the string could not be found.

TestPartNo("…", 0/1)
Parameters:

string
0 or 1
 0: skips all descendant commands for this unit and continues
with the script flow
 1: Cancels the whole script with an error message if the
string could not be found

Checks for the existence of the string in the "VAG number” field within a control unit.

Example: TestPartNo("5QA 919 294", 1)

Explanation: Checks for the string "5QA 919 294 " in the Part no field. The whole script is
cancelled with an error if the string could not be found.

TestAdpChannel("…","…", 0/1)
Parameter:

string (title or substring of the title)


string (optional: current value of the channel)
0 or 1
 0: skips all descendant commands for this unit and continues
with the script flow
 1: Cancels the whole script with an error message if the
string could not be found

Checks for the existence of an adaptation channel in a unit before proceeding. The current value of
the adaptation channel can also be checked optionally.

Example: TestAdpChannel("Erweiterte_Fernlichtsteuerung", "", 0)

Explanation: Checks for the existence of the adaptation channel mentioned in the first parameter.
The script skips the whole unit if the channel does not exist. (In this case quite useful to distinguish
between pre facelift and facelift MQB BCMs)

Example: TestAdpChannel("Erweiterte_Fernlichtsteuerung, "AFS: FLA:


Fernlicht (GLW:MDF)", 1)
Explanation: Checks the existence of the adapation channel but also its current value mentioned in
the second parameter. The whole script is cancelled with an error if one of the two conditions is not
met.

ClearDTCs()
Parameters: None

Clears the fault codes of the currently opened control unit. Clearing fault codes is always possible,
not only when there are DTCs stored actually.

LoginToUnit("…")
Parameters:

Login code for control unit

Performs a login (Security Access) with the given login code for the currently opened control unit.

Example: LoginToUnit("31347")

ChangeCoding("…", "…")
Parameters:

Bits to be activated (Parameter 1


Bits to be deactivated (Parameter 2)

Changes the coding of a control units. You can activate and deactivate bits.

The syntax of a parameter is as follows:

[Byte]:[Bit],[Bit]/[Byte]:[Bit],[Bit]

Examples:

ChangeCoding("4:1,2,3/5:0", "")
 Activates Byte 4 Bit 1, 2, 3 and Byte 5 Bit 0
ChangeCoding("6:7", "2:5,6")
 Activated Byte 6 Bit 6, deactivates Byte 2 Bit 5 and Bit 6
ChangeCoding("”, "1:7”)
 Deactivates Byte 1 Bit 7

You can leave a parameter empty if you only want to activate/deactivate bits.

It is not necessary that the source coding has to differ from the target coding in order to let the
command work. If source coding equals the target coding, the coding gets applied anyway.

The script will be cancelled with an error if the desired byte does not exist because the coding is just
not long enough.
Hint: Short decimal codings are not supported!

ChangeCodingInSub("…", "…", "…")


Parameters:

String of subsystem name (Parameter 1)


Bits to be activated (Parameter 2)
Bits to be deactivated (Parameter 3)

Changes the coding of a sub-system (e.g. Rain light sensor).

The command syntax is the same as ChangeCoding except for the search string in parameter 1.

The search string has to be found in the sub-system dropdown when selecting a sub-system.

Example: ChangeCodingInSub("RLFS", "0:2", "”)

Activates Byte 0 Bit 2 in the RLFS sub-system in case you first connected to unit 09

ChangeAdpChannel("…", "…")
Parameters:

String to be found in adaptation channel’s title


New destination value

Changes an adaptation channel.

Example: ChangeAdpChannel("Automatic activation", "active")

The search string has to reveal a hit in the adaptation channel dropdown list, otherwise the script will
be cancelled with an error.

Multiple hits:
In case that a search string reveals multiple hits that all contain the search string and the first hit ends
with the search string, the first hit will be used and changed. E.g. "road_sign_identification".

The destination value has to equal to a value available in the drop-down list for the new value:

The whole script will be cancelled with an error if the destination value is not found.

Hint: Adaptation channels with a plain text field for new values are also supported!

Restriction: Adaptation of CAN-only units with channel numbers are not supported!

CloseUnit()
Parameters: None

Closes the communication with the currently opened control unit.

ClearAllDTCs()
Parameters: None

Clears all fault codes in all control units.

This command is only allowed outside of any control unit script flow.
Scope of commands

The intention of the commands should intuitively help to understand which commands do work
without the scope of a control unit and which do not. Only CheckForUnits and ClearAllDTCs do
work outside the scope of a control unit. The script editor will reveal any syntax error anyway.

Comments

Comments can be used within the script. They are introduced by a semi-colon.

4) Save & Sealing of a script


The Save button allows to save a script to a file with all additional information (Author, comment, if
specified)

You will get a dialog window on saving a script that asks if you want to seal the script.

Confirming this by clicking "No” will just save the script to the file specified.

Clicking "Yes” will calculate a unique checksum based on the script information to have the possibility
to check the authenticity of the script.

Loading the script will re-calculate the checksum to assure that it


is still the same script that the author saved before. You will be
noticed with a bad checksum if the script was manipulated in any
way.

Sealing the scripts may be a good way for assuring the


authenticity of the scripts when they get shared in the
community all over the world. The author can protect his work.

5) Compile scripts

Pressing the button "Compile script” will not execute the script
but compile it to an independent executable file.

With that option scripts can be distributed and executed


without the need of using VCDScripter on your PC to execute a
script.

Clicking on an executable will ask you if you really want to execute it. The message box contains all
relevant script information like Author, Comment and the script content itself.
Important: It is very likely that Virus scanners will detect a stand-alone executable as malware and
classify it as quite dangerous. This could result in moving the script to quarantine or even having it
deleted by the virus scanner. The script files do NOT contain harmful code, but scanners may
interpret the behavior of the scripts as harmful.

6) Run script

Pressing the "Run script” button will execute the script


immediately.

VCDS should be closed at this point, otherwise you will get an


error message.
7) Limitations and Notes

a) Limitations

VCDScripter has a few limitations and restrictions:

Only vehicles are supported that support automatic detection of installed units
("Installed” tab on the control module overview)
Short / decimal type of coding is not supported
Adaptations based on channel numbers is not supported
Only the new interface generation is supported (HEX-V2 or HEX-NET)

b) Error handling

There is a logic implemented that should recognize an uncommon idle time of the script because of
any unexpected or unknown circumstances. In this case the script stops with an error.

If there is no error message that tells you the script has been cancelled or if there is no success
message, the script has to be cancelled manually using the icon in the system tray. (gear icon, right-
click, Exit).

Important notice regarding error handling:

There is no automatic rollback of already performed coding actions in case that the script is
cancelled!

Steps that are already performed will not be reverted back. You have to be aware of that. Using the
option to renew the debug logs on every script run will assure that you have a good overview of what
has been changed in the control units before the
script was cancelled.
8) Example: Trailer hitch retrofit MQB Facelift

Here you can see a quite complex script to activate a trailer hitch after having it retrofitted to an
MQB Facelift car. (Not raising a claim to be 100% correct)

You might also like