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_plus1print - print debug output to console
hmtoggle_plus1getVariableValue - retrieve the value of a project variable
hmtoggle_plus1setVariableValue - change the value of a project variable
hmtoggle_plus1getVariableValid - retrieve information if a project variable has a valid value
hmtoggle_plus1getProperty - retrieve a property value of a DDO
hmtoggle_plus1setProperty - change the property value of a DDO
hmtoggle_plus1readFile - read the contents of a file
hmtoggle_plus1writeToFile - write a string to a file on the file system
hmtoggle_plus1getAlarmLogRingBufferContent - Read the alarm log ring buffer
hmtoggle_plus1deleteAlarmLogRingBufferContent - clear an alarm log ring buffer
hmtoggle_plus1moveDDO - move an object on the screen
hmtoggle_plus1showSoftkeyFrames - show faded-out softkey frames
hmtoggle_plus1sendCANMessage - send a CAN message
hmtoggle_plus1includeFile - include another JavaScript file
hmtoggle_plus1function - use functions in JavaScript
hmtoggle_plus1generateAction - simulate encoder actions
hmtoggle_plus1deletePageHistory();
hmtoggle_plus1multimediaCommand - send commands to a MultimediaPlayer object
hmtoggle_plus1save2DGraphHistory - Save the value history of a 2D Graph (to external media)
hmtoggle_plus1delete2DGraphHistory - Delete the value history of a 2D Graph object
hmtoggle_plus1requestVariableValueFromOwner - Initiate a read request to the owner of a variable (CANopen SDO Upload Request)
hmtoggle_plus1startTouchscreenCalibration - Start calibration of resistive touchscreen
hmtoggle_plus1writeEEPROM - Write a value to the EEPROM
hmtoggle_plus1readEEPROM - read a value from the EEPROM
hmtoggle_plus1getCallerID - Retrieve the ID of the object/variable that triggered the script
hmtoggle_plus1createUSBDirectory - Create a directory on the USB stick or in user_files
hmtoggle_plus1getDirectoryContent - Get the contents of a directory
hmtoggle_plus1deleteFileOrDirectory- Delete a file or directory on a USB stick or in user_files
hmtoggle_plus1setFocus - Set navigation focus to certain object
hmtoggle_plus1copyFileOrDirectory - Copy file(s) or directory/ies
hmtoggle_plus1moveFileOrDirectory - Move file(s) or directory/ies
hmtoggle_plus1syncFilesystem - Forces finishing of all file operations

 

RS232 JavaScript Functions