Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable Address #31

Open
GoogleCodeExporter opened this issue Oct 13, 2015 · 1 comment
Open

Variable Address #31

GoogleCodeExporter opened this issue Oct 13, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link
Contributor

Hello!

I have a problem. How can i change address in the loop (arduino 103) ?
I try, but dosn't work: (Always read the Address 1 and not read Address 2)

unsigned int modbusaddress = 1;

void setup()
{
.........
modbus_construct(packet1, modbusaddress, READ_HOLDING_REGISTERS, 0, 1, 
readRegs);
.......
void loop()
{
  modbusaddress = 2;  
  modbus_update();
  ...
}

Somebody help me please!
Thanks

Original issue reported on code.google.com by [email protected] on 27 Jun 2014 at 4:13

Attachments:

@GoogleCodeExporter
Copy link
Contributor Author

This is not a defect. You are using the functions incorrectly. Use a different 
packet when polling different id addresses, functions or register addresses. 
See the library examples and check out the forum thread: 
http://forum.arduino.cc/index.php?topic=176142.0 for more information and help.

Original comment by [email protected] on 28 Jun 2014 at 3:07

  • Removed labels: Type-Defect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant