lib/plc/emulator/emu_plc.rb in ladder_drive-0.3.1 vs lib/plc/emulator/emu_plc.rb in ladder_drive-0.4.0

- old
+ new

@@ -150,11 +150,11 @@ end else case d.suffix when "PRG" c.times do - r << program_data[d.number * 2, 2].pack("c*").unpack("n").first + r << program_data[d.number * 2, 2].pack("C*").unpack("n").first d = device_by_name (d+1).name end else c.times do r << d.word(:out) @@ -167,10 +167,10 @@ d = device_by_name a[1] c = a[2].to_i case d.suffix when "PRG" a[3, c].each do |v| - program_data[d.number * 2, 2] = [v.to_i].pack("n").unpack("c*") + program_data[d.number * 2, 2] = [v.to_i].pack("n").unpack("C*") d = device_by_name (d+1).name end else if d.bit_device? a[3, c].each do |v|