Custom JavaScript functions for device specific functionality

<< Click to Display Table of Contents >>

Navigation:  JavaScript >

Custom JavaScript functions for device specific functionality

Various custom functions exist that help JavaScript interact with project variables and objects. By pressing CTRL+SPACE in the JavaScript editor content area (1), a list with auto complete suggestions will appear. On the top of the list are functions from the category Custom Functions (2). A Tooltip (3) for the selected function shows a short description and gives informations about the parameter(s) / return types.

js_predefined_functions.png

hmtoggle_plus1pclient.print - print debug output to console
hmtoggle_plus1pclient.getVariableValue - retrieve the value of a project variable
hmtoggle_plus1pclient.setVariableValue - change the value of a project variable
hmtoggle_plus1pclient.getVariableValid - retrieve information if a project variable has a valid value
hmtoggle_plus1pclient.getProperty - retrieve a property value of a DDO
hmtoggle_plus1pclient.setProperty - change the property value of a DDO
hmtoggle_plus1pclient.readFile - read the contents of a file
hmtoggle_plus1pclient.writeToFile - write a string to a file on the file system
hmtoggle_plus1pclient.getAlarmLogRingBufferContent - Read the alarm log ring buffer
hmtoggle_plus1pclient.deleteAlarmLogRingBufferContent - clear an alarm log ring buffer
hmtoggle_plus1pclient.moveDDO - move an object on the screen
hmtoggle_plus1pclient.showSoftkeyFrames - show faded-out softkey frames
hmtoggle_plus1pclient.sendCANMessage - send a CAN message
hmtoggle_plus1pclient.includeFile - include another JavaScript file
hmtoggle_plus1function - use functions in JavaScript
hmtoggle_plus1pclient.generateAction - simulate encoder actions
hmtoggle_plus1pclient.deletePageHistory();
hmtoggle_plus1pclient.multimediaCommand - send commands to a MultimediaPlayer object
hmtoggle_plus1pclient.save2DGraphHistory - Save the value history of a 2D Graph (to external media)
hmtoggle_plus1pclient.delete2DGraphHistory - Delete the value history of a 2D Graph object
hmtoggle_plus1pclient.requestVariableValueFromOwner - Initiate a read request to the owner of a variable (CANopen SDO Upload Request)
hmtoggle_plus1pclient.writeEEPROM - Write a value to the EEPROM
hmtoggle_plus1pclient.readEEPROM - read a value from the EEPROM
hmtoggle_plus1pclient.getCallerID - Retrieve the ID of the object/variable that triggered the script
hmtoggle_plus1pclient.createUSBDirectory - Create a directory on the USB stick or in user_files
hmtoggle_plus1pclient.getDirectoryContent - Get the contents of a directory
hmtoggle_plus1pclient.deleteFileOrDirectory- Delete a file or directory on a USB stick or in user_files
hmtoggle_plus1pclient.setFocus - Set navigation focus to certain object
hmtoggle_plus1pclient.copyFileOrDirectory - Copy file(s) or directory/ies
hmtoggle_plus1pclient.moveFileOrDirectory - Move file(s) or directory/ies
hmtoggle_plus1pclient.syncFilesystem - Forces finishing of all file operations
hmtoggle_plus1pclient.openPDFReader - Open the PDF Reader
hmtoggle_plus1pclient.runSystemCommand - run a Linux system command
hmtoggle_plus1pclient.getTriggerEvent - obtain the trigger for a script execution
hmtoggle_plus1pclient.setVariableValid - set a variable as valid / invalid
hmtoggle_plus1pclient.updateSoftkeyFrameFadeoutTime - set the fadeout time for Softkey frames

RS232 JavaScript Functions