“@”是什么意思?符号是什么意思(欧姆龙PLC)?
梯形图编程中的“@”符号是什么意思?文档解释了@以二进制模式指定间接DM地址...偏移内存区域:这实际上意味着什么?
考虑文档中的以下图像:
地址的内容(16 位或十进制)如何32767) 变成字地址?例如,如果地址 CIO 0 的内容为 000000001000000:添加 @ 符号,CIO 0 会更改为 <强>000000001000000?上述指令中到底移动了什么?
What does the "@" sign means in ladder programming? Documentation explains the @ specifies an indirect DM address in binary mode ... offset an memory area: what does that mean actually?
Consider the following image from the documentation:
How can the content of a the address (a 16 bits or decimal 32767) becomes the word address? For example, if adress CIO 0 has content of 000000001000000: adding the @ sign the CIO 0 changes to 000000001000000? What exactly is moving in the above instruction?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这仅适用于 DM(数据存储器)。欧姆龙PLC有很多存储区。 CIO 通常仅用于输入/输出位。 W(工作)用于存储工作内存位(例如 RAM),H(保持)用于存储在断电时必须保留其值的位(例如硬盘驱动器,位数据)。 DM 和 EM 主要用于保存 WORD 数据,断电时也会存储。当然,对此没有硬性规定 - 例如,在很多情况下,如果您愿意,您可以使用 CIO 位来代替 W 位,但每个位都有某些独特的功能,可以区分它们并使它们更加出色适用于某些目的。
在这种情况下,@符号的作用就像一个指针。如果我使用指令 [MOV #1 D300],我会将十六进制数据 [x0001] 移动到内存位置 D300。需要明确的是,#1(第二个参数)是一个值为 x0001 的十六进制(符号 #)常量。如上例所示,如果 D300 包含值 [x0100](= 256 十进制),并且如果我使用指令 [MOV #1 @D300],我不会将值 [x0001] 移动到 D300,但我会将其移动到D300 中包含的地址 - 在本例中为 D256。
请注意,@ 符号用于二进制/十六进制格式的指针。如果 D300 = [x0100],则 @D300 的 MOV 指令会将数据移至 D256(十六进制 0100)。您还可以使用 * 修饰符执行 [MOV #1 *D300],这会将存储在 D300 中的 0100 视为 BCD 值 - 换句话说,它不会指向 D256,而是指向 D100!
使用指针可以让您不必修改 MOV 指令,例如,如果您想在不同条件下将一个值定向到一系列不同的位置。如果您想将内存移动重定向到不同的地址,您只需更新 D300 中存储的地址值即可。
请注意,@ 符号可以通过助记符表示其他含义 - 例如,@LD 表示差分 UP 触点!
This works for DM (Data Memory) only. There are many memory areas of an Omron PLC. CIO is usually used for input/output bits only. W (work) is used to store working memory bits (think RAM), H (hold) is used to store bits whose values must be retained if power is lost (think Hard Drive, bit data). DM and EM are used primarily for holding WORD data, also stored if power is lost. There are no hard and fast rules about this, of course - in a lot of circumstances you can use CIO bits in place of W bits, for example, if you want to, but each has certain unique features that differentiate them and make them more suitable for certain purposes.
In this case the @ symbol works like a pointer. If I used the instruction [MOV #1 D300] I would move the hex data [x0001] to memory location D300. To be clear, #1 (the second argument) is a hexadecimal (symbol #) constant of value x0001. If, as in the above example, D300 contained the value [x0100] (=256 decimal) and if I used the instruction [MOV #1 @D300] I would not move the value [x0001] to D300 but I would move it to the address contained in D300 - in this case D256.
Note that the @ symbol is used for pointers in binary/hex format. If D300 = [x0100] then a MOV instruction to @D300 will move data to D256 (hex 0100). You can also use the * modifier to do [MOV #1 *D300] and this will treat the 0100 stored in D300 as a BCD value - in other words, instead of pointing to D256 it will point to D100!
Using pointers allows you to not have to modify your MOV instruction, for example, if you want to direct a value to a series of different places in different conditions. If you wanted to redirect the memory movement to a different address you would just update the address value stored in D300.
Note that the @ symbol can mean other things with mnemonics - @LD, for example, means a differential UP contact!
Omron PLC 中函数中的 @ 符号意味着它仅在前沿运行。
例如,对于较旧的 PLC @INC 或对于较新的 PLC @++ 表示在前沿将通道递增 1。较新的 PLC 中的 ++ 函数是二进制的,而较旧的 PLC 中的 INC 函数是 BCD。
The @ sign in a function in Omron PLC means it operates only on a leading edge.
For example, With the older PLCs @INC or with the newer PLCs @++ means increment a channel by 1 on a leading edge. The ++ function in the newer PLCs is binary while the INC function in the older PLCs is BCD.