InoDrive / IO / getSafetyInput


InoDrive.IO.getSafetyInput()

Get Connection State of Safety Inputs

Arguments:

Input (Number) Which of the two inputs to get the state of, STO1 and STO2 or both

Returns: Input Signal (Boolean)
• For Individual STO checks, returning Safety state is on(1) or off(0).
• For general/both STO check, returning Safety state is on (3) or off (0) If 0, note that the safety has been tripped and your motor light is blue — the motor has been de-energized.

// Import InoDrive API Library
 import { InoDriveApiJS }  from ( "ck-inodrive-api" ) 

// Instatiate the API
let InoDriveApi = new InoDriveApiJS.InoDriveApi({ connectAppUrl: "", secure: false })

// Instantiate InoDrive Object
Drive = await InoDriveApi.InoDrive({target:'Name', autoConnect:True})

// Get information about the STO1
await Drive.IO.getSafetyInput(0)

// Get information about both of the STOs
await Drive.IO.getSafetyInput()