Engee documentation

GP-LC-4X DPWM

Setting PWM on discrete pins GP-LC-4X using output DMA.

blockType: SubSystem

Path in the library:

/RITM/RITMeX GP-LC-4X/GP-LC-4X DPWM

Description

To work with the block, install/update the support package RITM blocks.

Block GP-LC-4X DPWM It is used to set PWM on discrete pins GP-LC-4X using output DMA.

When using the block GP-LC-4X DPWM the ability to use the block is lost GP-LC-4x DO on this I/O module, even on unused channels.
When using high-frequency periodic signal generation units on a specific analog output channel of the I/O module RITMeX GP-LC-45, it will no longer be possible to use other high-frequency periodic signal generation units on another channel of this module.
When changing the parameters of the signal at low frequencies (up to 1kHz), the change in the waveform takes effect after 1-2 periods of this signal. When changing the parameters of the signal at high frequencies, the changes take effect in at least 1 ms and no more than 2 ms. The process of changing the waveform does not affect the TET of the block.

Ports

Input

# Frequency, Hz — signal frequency for all involved discrete output channels
scalar

Details
Data types

Float64.

Complex numbers support

No

# RMS — PWM frequency in the form of an array, which must have a size equal to the number of channels used
vector

Details

The slowness refers to the ratio of the signal period to the pulse width.

Data types

Float64.

Complex numbers support

No

Parameters

All the parameters listed except the last three specify the waveform only during initialization. If at the first calculation step the corresponding parameters at the inputs of the block are different, then the waveform will be changed.

Main group

# Частота (10-100000 Гц): — initial frequency of the signal for all involved discrete output channels

Details
Default value

10

Program usage name

m_freq

Tunable

No

Evaluatable

Yes

# Скважность: — initial PWM slope in the form of an array, which must have a size equal to the number of channels involved

Details
Default value

[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]

Program usage name

m_phase

Tunable

No

Evaluatable

Yes

# Стартовый канал: — the first discrete output channel to be used
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16

Details
Values

1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16

Default value

1

Program usage name

m_inich

Tunable

No

Evaluatable

Yes

# Количество каналов (1-16): — number of discrete output channels involved

Details
Default value

16

Program usage name

m_chnum

Tunable

No

Evaluatable

Yes

# Номер модуля: — unique module identification
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8

Details

Used when more than one I/O module of the same type is installed in a real-time machine.

Values

1 | 2 | 3 | 4 | 5 | 6 | 7 | 8

Default value

1

Program usage name

m_devnum

Tunable

No

Evaluatable

Yes

# Шаг расчета, с: — calculation step in seconds for sending counts to digital output channels from the real-time application

Details
Default value

-1

Program usage name

m_smplT

Tunable

No

Evaluatable

Yes