Giter Club home page Giter Club logo

simplegx's Introduction

simplegx

use C# on GX Simulator2(MELSEC) without MX Component.

用途

趣味。業務用利用はどうかお控えください。利用によって損害は負いません。

内容物

  • SimpleGXSimu.dll (要 .NET4.5互換 Runtime. .NET DLL) 本体
  • KumaNetCLI_x86.dll (要 VCpp2013 互換 Runtime. C++/CLI DLL) 下記DLLの .NETラッパ
  • KumaNet_x86.dll (要 VCpp2013 互換Runtime. C++ DLL) プロセス関係

これら 3つの DLL すべて必要です。

利用方法

zipをダウンロードし解凍します。DLL参照済みであるVisual Studio ソリューションファイルを VS2013-2022 で開きます。サンプルアプリを自由に変更し実行します。 添付ソリューションは VB.NET 向けです。DLL参照の設定は、ごく一般的方法です。

CSharp

//using SimpleGXSimu でDLLを読み込んでください

            GXSim ins = new GXSim();
            ins.CPU =(int)enumCPU._Non;

            ReturnUS rtn = ins.ReadDeviceBlock2("D0",10);
            MessageBox.Show(ins.UShortDis(rtn.dat,"/"));

           ushort[] dat = new ushort[960];
           ushort i;
           for (i = 0; i < 959; i++) { dat[i] =(ushort)(i+1) ; }

           ins.WriteDeviceBlock2("D0",960,dat);

VB.NET

'Imports SimpleGXSimu でDLLを読み込んでください

        Dim ins As New GXSim
        ins.CPU = enumCPU._Non  'CPUの型番. 列挙体がある(e.g. Q00なら _Non, Q00U なら U )

        Dim rtn As ReturnUS = ins.ReadDeviceBlock2("D0", 10)
        MsgBox(ins.UShortDis(rtn.dat, "/"))
        Dim dat(960) As UShort : For i = 0 To 959 : dat(i) = i + 1 : Next
        ins.WriteDeviceBlock2("D0", 960, dat)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.