![DEUTSCHMANN AUTOMATION UNIGATE CM - PROFINET 2Port Скачать руководство пользователя страница 23](http://html.mh-extra.com/html/deutschmann-automation/unigate-cm-profinet-2port/unigate-cm-profinet-2port_instruction-manual_2488383023.webp)
Synchronous serial interface
Deutschmann Automation GmbH & Co. KG
22
Instruction manual UNIGATE
®
FC - PROFINET 2Port V. 1.5
4.10.17
Set( ShiftRegisterInputBitLength, 16 );
Set( ShiftRegisterOutputBitLength, 16 );
WriteShiftRegister( OutBuffer[0] );
ReadShiftRegister( InBuffer[0] );
// Input data is now in the INBuffer
// 0x58 is applied to the outputs of the analog converter
// 0x21 at the shift register‘s outputs
5.2
SPI mode
Before the interface can be used in SPI mode, this must be initialized. The command
InitSPI
sets the operating type, the mode (signal polarity and phase) and the clock frequency.
The data exchange ensues with the command
ExchangeSPI
. The maximum clock frequency is
between 1 and 5 MHz, depending on the hardware. For details please see the IC-Pinout list in
the download area of our website.
Please also refer to the script commands documentation in the online help of the Protocol
Developer.
5.2.1
Example-Script
var L_Freq : long;
var b_Channel : byte;
var w_Len : word;
var a_BufOut : buffer[100];
var a_BufIn : buffer[100];
moveconst( L_Freq, 1000000); // 1 MHz
InitSPI( 1 , 0 , L_Freq );
moveconst( b_Chanel, 0 );
moveconst( w_Len, 11 );
moveconst( a_BufOut[0], "Hello World" );
ExchangeSPI( b_Channel , w_Len , a_BufOut[0] , a_BufIn[0] );
Содержание UNIGATE CM - PROFINET 2Port
Страница 2: ...Manual Art No V3893E ...
Страница 3: ......
Страница 7: ...Deutschmann Automation GmbH Co KG 6 Instruction manual UNIGATE FC PROFINET 2Port V 1 5 4 10 17 ...
Страница 47: ...Servicing Deutschmann Automation GmbH Co KG 46 Instruction manual UNIGATE FC PROFINET 2Port V 1 5 4 10 17 ...
Страница 48: ......