mokomoking2501/profinet_master/profidrive does not have a README file

    DriveObjectProperties

    pub(all) struct DriveObjectProperties {
    telegram_no : Int
    hw_version : String
    sw_version : String
    speed_norm_value : Int
    max_speed_rpm : Int
    rated_current_ma : Int
    rated_torque_nm : Int
    } derive(Eq,
    Debug
    )

    Drive Object properties (DO Identification, PNU 975).

    DriveState

    pub(all) enum DriveState {
    S1_SwitchingOnInhibited
    S2_ReadyToSwitchOn
    S3_SwitchedOn
    S4_Operation
    AUS2_CoastStop
    AUS3_QuickStop
    } derive(Eq,
    Debug
    )

    PROFIdrive controller application – drive states (IEC 61800-7-200 §6.3).

    ParamRequest

    pub(all) struct ParamRequest {
    request_id : Byte
    axis : Int
    pnu : Int
    subindex : Int
    num_elements : Int
    } derive(Eq,
    Debug
    )

    PROFIdrive parameter request (single parameter).

    ParamResponse

    pub(all) struct ParamResponse {
    format : Byte
    num_values : Int
    values : Bytes
    } derive(Eq,
    Debug
    )

    PROFIdrive parameter response (single parameter).

    PncAddressType

    pub(all) enum PncAddressType {
    GeoAddrSubmod
    SubmodList
    CtrlInfo
    } derive(Eq,
    Debug
    )

    PNC address types (PN-Controller geographic addressing).

    PncAlarmType

    pub(all) enum PncAlarmType {
    Diagnostic
    Process
    Pull
    Plug
    Status
    Update
    Redundancy
    Controlled
    Released
    PlugWrong
    Return
    Diagnosis
    MaintenanceRequired
    MaintenanceDemanded
    PortDataChanged
    SyncDataChanged
    IsochDataChanged
    NetworkComponentProblem
    MultiplexerProblem
    UploadRetrievalNotification
    DevFailure
    DevReturn
    } derive(Eq,
    Debug
    )

    PNC_PN_ALARM_TYPE — Alarm type enumeration (corresponds to alarm module).

    PncCtrlInfo

    pub(all) struct PncCtrlInfo {
    ctrl_name : String
    ctrl_ip : String
    subnet_mask : String
    gateway_ip : String
    } derive(Eq,
    Debug
    )

    PNC_CTRL_INFO — Controller-specific information.

    PncGeoAddr

    pub(all) struct PncGeoAddr {
    station_number : Int
    slot_number : Int
    subslot_number : Int
    } derive(Eq,
    Debug
    )

    PNC geographic submodule address.

    PncSubmodComProp

    pub(all) struct PncSubmodComProp {
    cycle_time : Int
    cacf : Int
    red_factor : Int
    phase : Int
    ti : Int
    to : Int
    } derive(Eq,
    Debug
    )

    Communication properties for a PNC submodule.

    PncSubmodDataProp

    pub(all) struct PncSubmodDataProp {
    len_in : Int
    len_out : Int
    } derive(Eq,
    Debug
    )

    Data properties for a PNC submodule.

    PncSubmodList

    pub(all) struct PncSubmodList {
    sm_ref : Int
    data_prop : PncSubmodDataProp
    com_prop : PncSubmodComProp
    pn_prop : PncSubmodPnProp
    } derive(Eq,
    Debug
    )

    PNC_SUBMOD_LIST — Full sub-module entry in the PNC device list.

    PncSubmodPnProp

    pub(all) struct PncSubmodPnProp {
    mod_id : Int
    submod_id : Int
    } derive(Eq,
    Debug
    )

    PROFINET properties for a PNC submodule.

    TelegramData

    pub(all) struct TelegramData {
    stw1 : Int
    stw2 : Int
    n_soll_a : Int
    n_soll_b : Int
    g1_stw : Int
    g2_stw : Int
    xerr : Int
    kpc : Int
    zsw1 : Int
    zsw2 : Int
    nist_a : Int
    nist_b : Int
    g1_zsw : Int
    g1_xist1 : Int
    g1_xist2 : Int
    g2_zsw : Int
    g2_xist1 : Int
    g2_xist2 : Int
    } derive(Eq,
    Debug
    )

    Telegram data structure (PDC_DO_TELEGRAM_TYPE, §5.2).

    counts_to_position_norm

    fn counts_to_position_norm(counts : Int, resolution : Int) -> Double

    Position setpoint: convert encoder counts to normalized value.

    drive_state_from_zsw1

    fn drive_state_from_zsw1(zsw1 : Int) -> DriveState

    Derive drive state from ZSW1 status word.

    drive_state_label

    fn drive_state_label(state : DriveState) -> String

    encode_param_request

    fn encode_param_request(req : ParamRequest) -> Bytes

    Encode a PROFIdrive parameter request block.

    encode_telegram_setpoint

    fn encode_telegram_setpoint(tg : TelegramData) -> Bytes

    Encode setpoint portion of telegram (STW1+STW2+N_SOLL_A = 6 bytes).

    format_drive_object_properties

    fn format_drive_object_properties(props : DriveObjectProperties) -> String

    format_param_request

    fn format_param_request(req : ParamRequest) -> String

    Format parameter request summary.

    format_pnc_ctrl_info

    fn format_pnc_ctrl_info(info : PncCtrlInfo) -> String

    format_pnc_geo_addr

    fn format_pnc_geo_addr(addr : PncGeoAddr) -> String

    format_pnc_submod_list

    fn format_pnc_submod_list(entry : PncSubmodList) -> String

    format_telegram

    fn format_telegram(tg : TelegramData) -> String

    Format a telegram summary.

    n_soll_a_100_percent

    let n_soll_a_100_percent : Int

    Speed setpoint normalisation: 0x4000 (16384) = 100%.

    n_soll_a_to_rpm

    fn n_soll_a_to_rpm(n_soll : Int, max_rpm : Double) -> Double

    Reverse: normalized setpoint → RPM.

    n_soll_b_100_percent

    let n_soll_b_100_percent : Int

    Speed setpoint normalisation for 32-bit: 0x40000000 = 100%.

    param_request_read

    let param_request_read : Byte

    Parameter request ID: Read.

    param_request_write

    let param_request_write : Byte

    Parameter request ID: Write.

    parse_param_response

    fn parse_param_response(data : Bytes, offset : Int) -> ParamResponse raise
    FrameError

    Parse a PROFIdrive parameter response.

    parse_telegram_actual

    fn parse_telegram_actual(data : Bytes, offset : Int) -> TelegramData raise
    FrameError

    Parse actual-value portion of telegram (ZSW1+ZSW2+NIST_A = 6 bytes).

    pdc_coast_stop

    fn pdc_coast_stop(stw1 : Int) -> Int

    Build STW1 for coast stop (AUS2): any → AUS2.

    pdc_fault_acknowledge

    fn pdc_fault_acknowledge(stw1 : Int) -> Int

    Build STW1 for fault acknowledge.

    pdc_get_speed

    fn pdc_get_speed(td : TelegramData, max_rpm : Double) -> Double

    Get actual speed from TelegramData.

    pdc_precharge

    fn pdc_precharge(stw1 : Int) -> Int

    Build STW1 for PDC_Precharge: S2 → S3 transition.

    pdc_pulse_enable

    fn pdc_pulse_enable(stw1 : Int) -> Int

    Build STW1 for PDC_PulseEnable: S3 → S4 transition.

    pdc_pulse_inhibit

    fn pdc_pulse_inhibit(stw1 : Int) -> Int

    Build STW1 for PDC_PulseInhibit: S4 → S3 transition.

    pdc_quick_stop

    fn pdc_quick_stop(stw1 : Int) -> Int

    Build STW1 for quick stop (AUS3): any → AUS3.

    pdc_set_speed

    fn pdc_set_speed(td : TelegramData, rpm : Double, max_rpm : Double) -> TelegramData

    Set speed setpoint in a TelegramData.

    pnc_alarm_type_value

    fn pnc_alarm_type_value(alarm : PncAlarmType) -> Int

    pnu_control_word_1

    let pnu_control_word_1 : Int

    Standard PROFIdrive parameters.

    pnu_device_id

    let pnu_device_id : Int

    pnu_do_id_list

    let pnu_do_id_list : Int

    pnu_do_identification

    let pnu_do_identification : Int

    pnu_fault_buffer_scaling

    let pnu_fault_buffer_scaling : Int

    pnu_fault_code

    let pnu_fault_code : Int

    pnu_fault_code_list

    let pnu_fault_code_list : Int

    pnu_fault_message_counter

    let pnu_fault_message_counter : Int

    pnu_fault_number

    let pnu_fault_number : Int

    pnu_fault_number_text

    let pnu_fault_number_text : Int

    pnu_fault_situation_counter

    let pnu_fault_situation_counter : Int

    pnu_fault_time

    let pnu_fault_time : Int

    pnu_fault_value

    let pnu_fault_value : Int

    pnu_label

    fn pnu_label(pnu : Int) -> String

    pnu_label_ext

    fn pnu_label_ext(pnu : Int) -> String

    Extended PNU label lookup.

    pnu_operating_mode

    let pnu_operating_mode : Int

    pnu_sensor_format

    let pnu_sensor_format : Int

    pnu_sign_of_life_tolerance

    let pnu_sign_of_life_tolerance : Int

    pnu_speed_actual

    let pnu_speed_actual : Int

    pnu_speed_setpoint

    let pnu_speed_setpoint : Int

    pnu_station_name

    let pnu_station_name : Int

    pnu_station_name_2

    let pnu_station_name_2 : Int

    pnu_status_word_1

    let pnu_status_word_1 : Int

    pnu_telegram_selection

    let pnu_telegram_selection : Int

    Additional standard PROFIdrive PNUs.

    pnu_vendor_id

    let pnu_vendor_id : Int

    profile_id

    let profile_id : Int

    PROFIdrive profile identification.

    record_index_base

    let record_index_base : Int

    PROFIdrive record index for parameter access base.

    rpm_to_n_soll_a

    fn rpm_to_n_soll_a(rpm : Double, max_rpm : Double) -> Int

    Speed reference calculation: convert RPM to normalized setpoint.

    speed_percent_a

    fn speed_percent_a(n_soll : Int) -> Double

    stw1_enable_operation

    let stw1_enable_operation : Int

    stw1_enable_ramp

    let stw1_enable_ramp : Int

    stw1_enable_setpoint

    let stw1_enable_setpoint : Int

    stw1_fault_ack

    let stw1_fault_ack : Int

    stw1_for_transition

    fn stw1_for_transition(target : DriveState) -> Int

    Build STW1 for a desired target state transition.

    stw1_no_coast_stop

    let stw1_no_coast_stop : Int

    stw1_no_quick_stop

    let stw1_no_quick_stop : Int

    stw1_on_off1

    let stw1_on_off1 : Int

    STW1 bit masks (control word 1).

    stw1_unfreeze_ramp

    let stw1_unfreeze_ramp : Int

    zsw1_control_requested

    let zsw1_control_requested : Int

    zsw1_fault_active

    let zsw1_fault_active : Int

    zsw1_no_coast_stop

    let zsw1_no_coast_stop : Int

    zsw1_no_quick_stop

    let zsw1_no_quick_stop : Int

    zsw1_operation_enabled

    let zsw1_operation_enabled : Int

    zsw1_ready_to_operate

    let zsw1_ready_to_operate : Int

    zsw1_ready_to_switch_on

    let zsw1_ready_to_switch_on : Int

    ZSW1 bit masks (status word 1).

    zsw1_speed_deviation

    let zsw1_speed_deviation : Int

    zsw1_switching_on_inhibited

    let zsw1_switching_on_inhibited : Int

    zsw1_target_reached

    let zsw1_target_reached : Int

    zsw1_warning_active

    let zsw1_warning_active : Int

    Powered by MoonBit

    Site sourceReport issueModulesSkillsBuild queueStatistics

    © 2026 mooncakes.io