User Tools

Site Tools


doc:tools_quickscript

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
doc:tools_quickscript [2015/02/14 15:33] admindoc:tools_quickscript [2015/02/14 21:01] admin
Line 6: Line 6:
  
 With the mouse you select the elements you want to have, drag and drop your program flow, fill in the parameters and finally download the compiled script ready to run. With the mouse you select the elements you want to have, drag and drop your program flow, fill in the parameters and finally download the compiled script ready to run.
 +
 +
 +{{:doc:qs_screenshot.png?600|}}
 +
  
 All this runs in all modern browsers (except the Internet Explorer, as it seems :-( ), so you only need to go to [[http://quickscript.oobd.org| OOBD QuickScript]] to have your first script ready in about five minutes. All this runs in all modern browsers (except the Internet Explorer, as it seems :-( ), so you only need to go to [[http://quickscript.oobd.org| OOBD QuickScript]] to have your first script ready in about five minutes.
Line 13: Line 17:
 ===== How it Works ===== ===== How it Works =====
  
-When opening the page, you'll find a first template and menu bar in the middle of the screen. When clicking onto the items in the menu bar, another menu opens where you can select the functionality you need. While all the other menu items only contain standard lua function, we'll concentrate on the OOBD menu with its related functions here.+When opening the page, you'll find a first template and menu bar in the middle of the screen. When clicking onto the items in the menu bar, another menu opens where you can select the functionality you need. While all the other menu items only contain standard lua function, we'll concentrate on the OOBD menu with its related functions here.
  
  
Line 22: Line 26:
 {{:doc:qs_mainmenu.png |}} {{:doc:qs_mainmenu.png |}}
  
-This is the starting point for your program. The program execution starts here, so here you can put the initialisation stuff (like setting the bus- and module parameters). Here you also need to place your main menu (in case you want to have one) with its menu items.+This is the starting point for your program. The program execution starts here, so here you can put the initialisation stuff in here (like setting the bus- and module parameters). Here you also need to place your main menu (in case you want to have one) with its menu items.
  
 ===== The Menu ===== ===== The Menu =====
Line 29: Line 33:
  
  
-Whenever you want to have a visible menu where the user can select some item from, you'll put these items into this menu structure. The menu title is that what is placed as header into the OOBD UI and helps the user to identify where he just is.+Whenever you want to have a visible menu where the user can select some item from, you'll put these items into this menu structure. The menu title is that what is placed as header into the OOBD UI and helps the user to identify where he is.
  
  
Line 41: Line 45:
   * Content: That is what appears as item description   * Content: That is what appears as item description
   * Icons: Here you can select which action flags (Update and Timer) this item should have   * Icons: Here you can select which action flags (Update and Timer) this item should have
-  * ID: This parameter is handed over to the related function call, where it can be used to control that behavior, e.g. using the same function,but with different parameters+  * ID: This parameter is handed over to the related function call, where it can be used to control that behavior, e.g. using the same function on different items, but with different parameters
  
  
Line 56: Line 60:
  
 ===== Set the Dongle ===== ===== Set the Dongle =====
- 
  
 {{:doc:qs_dongle.png |}} {{:doc:qs_dongle.png |}}
 +
 +
 +This command you'll need at least once at the beginning to initialize the OOBD dongle hardware. The parameters and their meanings are:
 +  * Bus Mode: Here you can define if the Dongle CAN controller should be off, just listen or active. For the RTC mode listening is good enough, while for UDS with it's sending messages an active bus is recommended :-)
 +  * Channel: Here you select the 500kb High- Speed or the 125kb Mid Speed bus of the Dongle
 +  * Protocol: Here you decide between the Real Time Data (RDT) listening or the UDS communication protocol
  
 ===== Define the Module ===== ===== Define the Module =====
Line 64: Line 73:
  
 {{:doc:qs_module.png |}} {{:doc:qs_module.png |}}
 +
 +This tells which module address to be used and how much time in milliseconds we'll give for a module answer. 
  
 ===== Request a Service ===== ===== Request a Service =====
  
 {{:doc:qs_service.png |}} {{:doc:qs_service.png |}}
 +
 +After so much configuration stuff we come to the first real data communication. With the request service you can send your own service request or, in case of the RDT protocol, fill the listening tables.
 +
 +If the program receives a positive answer from the module, means a service + 0x40 reply, the "success" branch is executed, where you place your own processing code. The variable ''udsLen'' contains the number of received bytes, the byte array ''udsBuffer'' the received bytes itself (don't forget: Lua arrays starts with 1 , not 0)
 +
 +Any failure is handled by the routine itself and the actual running code is left with a return. As return value a error code is returned ((I'm just struggling if it's a good idea to always straight return here -maybe I should change that..))
 +
  
 ===== Evaluate a Result ===== ===== Evaluate a Result =====
Line 73: Line 91:
 {{:doc:qs_measure.png |}} {{:doc:qs_measure.png |}}
  
 +And here now finally the probably most exiting routine: Requesting a value and get the clear text result in a single call. These are the parameters to make it work:
 +
 +
 +  * Service (hex): The service you want to call
 +  * Parameters (hex): The parameter you need to address the correct value of that service
 +  * Type: The format the answer is in:
 +    * ASCII: The answer is Text
 +    * Bit: The answer is handled as a single (on/of) Bit
 +    * numeric: a numeric Value (hard coded as UNSIGNED)
 +  * Startbit: On which bit (not byte!) the result is stored in the returned byte sequence
 +  * Length (Bits): How many bits (again: not bytes) the result occupies in the returned byte sequence. The length of a Bit value is always 1
 +  * Offset & Multiplier: Used in case of a numeric value: First the received bit sequence (defined by Startbit and Length) is transformed into an integer value. Then this value is multiplied with the multiplier and finally added by the offset.
 +  * Unit: In case of a numeric value, the Unit is attached to the numeric value to define its unit. In case of a bit value, the unit contains the textual description of the low ans high value of that bit, seperated by an |
  
  
doc/tools_quickscript.txt · Last modified: 2015/02/21 09:15 by admin