Last active
November 10, 2023 16:32
-
-
Save katsuyoshi/79c45e446d67aecffaa03684e64fdaba to your computer and use it in GitHub Desktop.
PlcAccess sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'plc_access' | |
plc = PlcAccess::Protocol::Mitsubishi::McProtocol.new host:"192.168.0.10" | |
plc["M0"] = true | |
plc["M0"] # => true | |
plc["M0", 10] # => [true, false, ..., false] | |
plc["D0"] = 123 | |
plc["D0"] # => 123 | |
plc["D0", 10] = [0, 1, 2, ..., 9] | |
plc["D0".."D9"] # => [0, 1, 2, ..., 9] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment