iconDreamine
← 목록

Dreamine.PLC.Omron.CxComponent

stablev1.0.1

옴론 CX-One 기반 드라이버 — FINS/UDP 프로토콜.

#communication#cxcomponent#dreamine#industrial-automation#omron#plc
TFM net8.0Package Dreamine.PLC.Omron.CxComponent참조 Dreamine.PLC.Abstractions, Dreamine.PLC.Core

Dreamine.PLC.Omron.CxComponent

English documentation

Dreamine PLC 통신을 위한 Omron CX-Compolet 어댑터 경계 패키지입니다.

중요 벤더 런타임 안내

이 패키지는 Omron CX-Compolet, SYSMAC Gateway, DLL, 설치 파일, 샘플, 라이선스가 필요한 Runtime 파일을 재배포하면 안 됩니다.

사용자는 Omron의 라이선스 조건에 따라 필요한 Omron 소프트웨어를 별도로 설치하고 정식 라이선스를 보유해야 합니다.

이 패키지는 사용자 PC에 설치된 벤더 Runtime과 연동하기 위한 어댑터 코드만 포함할 수 있습니다.

현재 상태

이 패키지는 벤더 Runtime을 직접 참조하지 않는 late-bound COM 어댑터를 제공합니다.

주요 클래스:

  • OmronCxComponentPlcClient
  • OmronCxComponentOptions
  • OmronCxAddressNameFormatter

기본 ProgID는 OMRON.Compolet.CJ2Compolet이며, Active 속성을 통해 연결 상태를 열고 ReadVariable, WriteVariable을 호출합니다. CX-Compolet 구성에 따라 ProgId, PeerAddressPropertyName, ReadVariableMethodName, WriteVariableMethodName을 옵션으로 조정할 수 있습니다.

샘플:

  • SampleSmart의 PLC Monitor 화면에서 CxComponent 모드를 선택합니다.
  • CX ProgID, CX Peer 값을 확인한 뒤 Use Client -> Connect 순서로 실행합니다.

권장 운영 경로:

  • 직접 FINS TCP/UDP 통신은 Dreamine.PLC.Omron.Fins를 사용합니다.
  • 프로젝트에서 명시적으로 CX-Compolet 또는 SYSMAC Gateway 연동이 필요한 경우에만 이 패키지를 사용합니다.

라이선스

Dreamine 어댑터 코드: MIT License.

Omron CX-Compolet 및 SYSMAC Gateway: 이 패키지에 포함되지 않으며, 이 패키지의 라이선스 대상도 아닙니다.

구조 다이어그램

classDiagram
    class CxComponentClient {
        -IIOCTL _ioctl
        +UnitNumber int
        +IsConnected bool
        +ConnectAsync() Task
        +DisconnectAsync() Task
        +ReadBitAsync(string) Task~bool~
        +ReadWordAsync(string) Task~short~
        +WriteBitAsync(string, bool) Task
        +WriteWordAsync(string, short) Task
    }
    class CxComponentOptions {
        +int UnitNumber
        +string ComPort
        +int BaudRate
        +int NetworkNumber
        +int NodeNumber
    }
    class PlcClientBase {
        <<abstract>>
    }
    PlcClientBase <|-- CxComponentClient
    CxComponentClient --> CxComponentOptions

API 문서

타입

ComInvoker

\if KO 후기 바인딩으로 CX-Compolet COM 멤버를 호출하는 도우미를 제공합니다. \endif \if EN Provides helpers for invoking late-bound CX-Compolet COM members. \endif

DefaultComObjectFactory

\if KO 설치된 COM 개체를 ProgID로 생성합니다. \endif \if EN Creates installed COM objects through their ProgID. \endif

IComObjectFactory

\if KO 후기 바인딩 COM 개체를 생성하는 팩터리 계약을 정의합니다. \endif \if EN Defines a factory contract for creating late-bound COM objects. \endif

OmronCxAddressNameFormatter

\if KO Dreamine PLC 주소를 CX-Compolet 변수 또는 주소 문자열로 변환합니다. \endif \if EN Formats Dreamine PLC addresses as CX-Compolet variable or address strings. \endif

OmronCxComponentOptions

\if KO Omron CX-Compolet/CX-Component 연결 옵션을 제공합니다. \endif \if EN Provides Omron CX-Compolet/CX-Component connection options. \endif

OmronCxComponentPlcClient

\if KO Omron CX-Compolet/CX-Component COM 인터페이스를 사용하는 PLC 클라이언트를 제공합니다. \endif \if EN Provides a PLC client that uses the Omron CX-Compolet/CX-Component COM interface. \endif

ComInvoker

CreateDetailedException Method

\if KO 중첩된 COM 호출 예외 메시지를 보존하는 상세 예외를 만듭니다. \endif \if EN Creates a detailed exception that preserves nested COM invocation messages. \endif

operation— \if KO 실패한 작업 설명입니다. \endif \if EN A description of the failed operation. \endif
exception— \if KO COM 호출에서 발생한 래퍼 예외입니다. \endif \if EN The wrapper exception raised by the COM invocation. \endif

반환: \if KO 원본 내부 예외와 상세 메시지를 포함한 예외입니다. \endif \if EN An exception containing the original inner exception and a detailed message. \endif

Invoke Method

\if KO 후기 바인딩을 사용해 COM 대상의 메서드를 호출합니다. \endif \if EN Invokes a method on a COM target by using late binding. \endif

target— \if KO 메서드를 소유한 COM 대상입니다. \endif \if EN The COM target that owns the method. \endif
name— \if KO 호출할 메서드 이름입니다. \endif \if EN The name of the method to invoke. \endif
args— \if KO 메서드에 전달할 인수입니다. \endif \if EN The arguments to pass to the method. \endif

반환: \if KO COM 메서드의 반환값이며 반환값이 없으면 입니다. \endif \if EN The COM method return value, or when it returns no value. \endif

SetProperty Method

\if KO 후기 바인딩을 사용해 COM 대상의 속성 값을 설정합니다. \endif \if EN Sets a property value on a COM target by using late binding. \endif

target— \if KO 속성을 소유한 COM 대상입니다. \endif \if EN The COM target that owns the property. \endif
name— \if KO 설정할 속성 이름입니다. \endif \if EN The name of the property to set. \endif
value— \if KO 설정할 값입니다. \endif \if EN The value to assign. \endif

DefaultComObjectFactory

Create Method

\if KO 지정한 ProgID에서 CX-Compolet COM 개체를 생성합니다. \endif \if EN Creates a CX-Compolet COM object from the specified ProgID. \endif

progId— \if KO 생성할 COM 클래스의 ProgID입니다. \endif \if EN The ProgID of the COM class to create. \endif

반환: \if KO 생성된 후기 바인딩 COM 개체입니다. \endif \if EN The created late-bound COM object. \endif

CreateFriendlyException Method

\if KO COM 등록 또는 생성 실패를 프로세스 비트 수 안내가 포함된 예외로 변환합니다. \endif \if EN Converts a COM registration or creation failure into an exception with process-bitness guidance. \endif

progId— \if KO 생성에 실패한 COM ProgID입니다. \endif \if EN The COM ProgID that could not be created. \endif
innerException— \if KO 원래 발생한 예외이며 없으면 입니다. \endif \if EN The original exception, or when unavailable. \endif

반환: \if KO 진단 안내와 원본 예외를 포함한 예외입니다. \endif \if EN An exception containing diagnostic guidance and the original exception. \endif

IComObjectFactory

Create Method

\if KO ProgID에서 COM 개체를 생성합니다. \endif \if EN Creates a COM object from a ProgID. \endif

progId— \if KO 생성할 COM 클래스의 ProgID입니다. \endif \if EN The ProgID of the COM class to create. \endif

반환: \if KO 생성된 COM 개체입니다. \endif \if EN The created COM object. \endif

OmronCxAddressNameFormatter

Format Method

\if KO PLC 주소를 CX-Compolet 주소 문자열로 변환합니다. \endif \if EN Formats a PLC address as a CX-Compolet address string. \endif

address— \if KO 변환할 PLC 주소입니다. \endif \if EN The PLC address to format. \endif

반환: \if KO CX-Compolet 주소 문자열입니다. \endif \if EN The CX-Compolet address string. \endif

FormatOffset Method

\if KO 오프셋 증분을 적용한 PLC 주소를 CX-Compolet 주소 문자열로 변환합니다. \endif \if EN Formats a PLC address as a CX-Compolet address string after applying an offset delta. \endif

address— \if KO 시작 PLC 주소입니다. \endif \if EN The starting PLC address. \endif
delta— \if KO 주소 오프셋에 더할 증분입니다. \endif \if EN The delta to add to the address offset. \endif

반환: \if KO 증분이 적용된 CX-Compolet 주소 문자열입니다. \endif \if EN The CX-Compolet address string with the delta applied. \endif

OmronCxComponentOptions

ActivePropertyName Property

\if KO 활성화 또는 연결 상태에 사용할 COM 속성 이름을 가져오거나 설정합니다. \endif \if EN Gets or sets the COM property name used for activation or connection state. \endif

PeerAddress Property

\if KO 상대 주소 또는 노드 이름 속성 값을 가져오거나 설정합니다. \endif \if EN Gets or sets the peer-address or node-name property value. \endif

PeerAddressPropertyName Property

\if KO 상대 주소에 사용할 COM 속성 이름을 가져오거나 설정합니다. \endif \if EN Gets or sets the COM property name used for the peer address. \endif

ProgId Property

\if KO CX-Compolet COM ProgID를 가져오거나 설정합니다. \endif \if EN Gets or sets the CX-Compolet COM ProgID. \endif

ReadVariableMethodName Property

\if KO 변수 읽기에 사용할 COM 메서드 이름을 가져오거나 설정합니다. \endif \if EN Gets or sets the COM method name used to read a variable. \endif

WriteVariableMethodName Property

\if KO 변수 쓰기에 사용할 COM 메서드 이름을 가져오거나 설정합니다. \endif \if EN Gets or sets the COM method name used to write a variable. \endif

OmronCxComponentPlcClient

#ctor Method

\if KO 기본 COM 개체 팩터리를 사용해 클래스의 새 인스턴스를 초기화합니다. \endif \if EN Initializes a new instance of using the default COM object factory. \endif

options— \if KO CX-Compolet 연결 및 메서드 설정입니다. \endif \if EN The CX-Compolet connection and method settings. \endif
#ctor Method

\if KO 지정한 COM 개체 팩터리를 사용해 클래스의 새 인스턴스를 초기화합니다. \endif \if EN Initializes a new instance of using the specified COM object factory. \endif

options— \if KO CX-Compolet 연결 및 메서드 설정입니다. \endif \if EN The CX-Compolet connection and method settings. \endif
factory— \if KO 후기 바인딩 COM 개체를 생성할 팩터리입니다. \endif \if EN The factory used to create the late-bound COM object. \endif
ConnectCoreAsync Method

\if KO COM 개체를 생성하고 상대 주소와 활성 상태를 설정해 CX-Compolet 연결을 엽니다. \endif \if EN Creates the COM object and opens the CX-Compolet connection by configuring its peer address and active state. \endif

cancellationToken— \if KO 연결 작업을 취소하는 토큰입니다. \endif \if EN A token that cancels the connection operation. \endif

반환: \if KO 연결 성공 결과를 포함하는 작업입니다. \endif \if EN A task containing the successful connection result. \endif

DisconnectCoreAsync Method

\if KO 가능한 경우 활성 속성을 해제하고 보유한 CX-Compolet COM 개체를 해제합니다. \endif \if EN Deactivates the connection when supported and releases the owned CX-Compolet COM object. \endif

cancellationToken— \if KO 연결 해제 작업을 취소하는 토큰입니다. \endif \if EN A token that cancels the disconnection operation. \endif

반환: \if KO 연결 해제 성공 결과를 포함하는 작업입니다. \endif \if EN A task containing the successful disconnection result. \endif

DisposeAsync Method

\if KO 기본 PLC 클라이언트 자원을 비동기로 정리하고 CX-Compolet COM 개체를 해제합니다. \endif \if EN Asynchronously disposes the base PLC client resources and releases the CX-Compolet COM object. \endif

반환: \if KO 비동기 정리 작업을 나타내는 값 작업입니다. \endif \if EN A value task representing the asynchronous disposal operation. \endif

ReadBitsCoreAsync Method

\if KO 연속된 PLC 비트 변수를 CX-Compolet 단건 호출로 읽습니다. \endif \if EN Reads consecutive PLC bit variables using individual CX-Compolet calls. \endif

address— \if KO 읽기를 시작할 PLC 주소입니다. \endif \if EN The PLC address at which to begin reading. \endif
count— \if KO 읽을 비트 수입니다. \endif \if EN The number of bits to read. \endif
cancellationToken— \if KO 읽기 작업을 취소하는 토큰입니다. \endif \if EN A token that cancels the read operation. \endif

반환: \if KO 읽은 비트 배열 또는 포착된 호출 오류를 포함하는 결과 작업입니다. \endif \if EN A task containing the bit array or a captured invocation error. \endif

ReadWordsCoreAsync Method

\if KO 연속된 PLC 워드 변수를 CX-Compolet 단건 호출로 읽습니다. \endif \if EN Reads consecutive PLC word variables using individual CX-Compolet calls. \endif

address— \if KO 읽기를 시작할 PLC 주소입니다. \endif \if EN The PLC address at which to begin reading. \endif
count— \if KO 읽을 워드 수입니다. \endif \if EN The number of words to read. \endif
cancellationToken— \if KO 읽기 작업을 취소하는 토큰입니다. \endif \if EN A token that cancels the read operation. \endif

반환: \if KO 읽은 워드 배열 또는 포착된 호출 오류를 포함하는 결과 작업입니다. \endif \if EN A task containing the word array or a captured invocation error. \endif

ReleaseComponent Method

\if KO 보유한 CX-Compolet COM 개체의 참조를 최종 해제하고 연결 상태를 초기화합니다. \endif \if EN Finally releases the owned CX-Compolet COM reference and clears the connection state. \endif

RequireComponent Method

\if KO 현재 연결된 CX-Compolet COM 개체를 반환합니다. \endif \if EN Returns the currently connected CX-Compolet COM object. \endif

반환: \if KO 연결된 COM 개체입니다. \endif \if EN The connected COM object. \endif

TrySetProperty Method

\if KO PLC 제품군에 따라 선택적인 COM 속성을 설정하며 속성이 없으면 무시합니다. \endif \if EN Sets an optional COM property and ignores it when the PLC-family control does not expose it. \endif

target— \if KO 속성을 소유한 COM 대상입니다. \endif \if EN The COM target that owns the property. \endif
name— \if KO 설정할 선택적 속성 이름입니다. \endif \if EN The optional property name to set. \endif
value— \if KO 설정할 값입니다. \endif \if EN The value to assign. \endif
WriteBitsCoreAsync Method

\if KO 연속된 PLC 비트 변수를 CX-Compolet 단건 호출로 씁니다. \endif \if EN Writes consecutive PLC bit variables using individual CX-Compolet calls. \endif

address— \if KO 쓰기를 시작할 PLC 주소입니다. \endif \if EN The PLC address at which to begin writing. \endif
values— \if KO 쓸 비트 값입니다. \endif \if EN The bit values to write. \endif
cancellationToken— \if KO 쓰기 작업을 취소하는 토큰입니다. \endif \if EN A token that cancels the write operation. \endif

반환: \if KO 성공 또는 포착된 호출 오류를 포함하는 결과 작업입니다. \endif \if EN A task containing success or a captured invocation error. \endif

WriteWordsCoreAsync Method

\if KO 연속된 PLC 워드 변수를 CX-Compolet 단건 호출로 씁니다. \endif \if EN Writes consecutive PLC word variables using individual CX-Compolet calls. \endif

address— \if KO 쓰기를 시작할 PLC 주소입니다. \endif \if EN The PLC address at which to begin writing. \endif
values— \if KO 쓸 워드 값입니다. \endif \if EN The word values to write. \endif
cancellationToken— \if KO 쓰기 작업을 취소하는 토큰입니다. \endif \if EN A token that cancels the write operation. \endif

반환: \if KO 성공 또는 포착된 호출 오류를 포함하는 결과 작업입니다. \endif \if EN A task containing success or a captured invocation error. \endif

Options Property

\if KO 이 클라이언트가 사용하는 CX-Compolet 옵션을 가져옵니다. \endif \if EN Gets the CX-Compolet options used by this client. \endif

_component Field

\if KO component 값을 보관합니다. \endif \if EN Stores the component value. \endif

_factory Field

\if KO factory 값을 보관합니다. \endif \if EN Stores the factory value. \endif

_options Field

\if KO options 값을 보관합니다. \endif \if EN Stores the options value. \endif