Giter Club home page Giter Club logo

Comments (6)

dathlin avatar dathlin commented on July 22, 2024

hslcommunicationdemo本身提供了这个虚拟服务器,可以用作没有PLC时候的测试

from hslcommunication.

lylyuanliang avatar lylyuanliang commented on July 22, 2024

我使用hsl虚拟模拟器, 然后发现了个问题, 暂时不知道什么原因造成的

前置描述:
内存类型: R
操作步骤: R1写入long类型数据9223372036854775807, R9写入short类型数据32767

问题描述1
按照我的推测, long类型数据占用了8个字节, R1为long类型, 那么我的下一个内存地址得为R9才不会影响R1的值, 但实际测试发现, 我对R5写入值都不会影响R1的值, (对R4写入会影响),
我的疑问是: R1已经为long了, 为啥下一个可用的地址是R5而不是R9呢

from hslcommunication.

dathlin avatar dathlin commented on July 22, 2024

因为R1 一个地址占2个字节

from hslcommunication.

lylyuanliang avatar lylyuanliang commented on July 22, 2024

因为R1 一个地址占2个字节

基于这个, 现在发现了另一个问题, R1写入字符串 abcdef, 长度为6, 按照一个地址2个字节, 我在R4写入应该不会有问题, 但实际R4写入后, R1的值受到了影响
image

from hslcommunication.

dathlin avatar dathlin commented on July 22, 2024

你截图中字符串读取,前面有个长度,默认是10,你要读取R1-R3的字符串的话,长度输入 3 就可以

from hslcommunication.

lylyuanliang avatar lylyuanliang commented on July 22, 2024

你截图中字符串读取,前面有个长度,默认是10,你要读取R1-R3的字符串的话,长度输入 3 就可以

感谢大佬! 另外再额外请教一下, GE SRTP设计的内存地址都是一个地址占两个字节吗, 我看到代码中WordLength为2

from hslcommunication.

Related Issues (20)

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.