Jim Warren
Hi there,
Can I start by saying what a brilliant job you have done with Editor and Runtime V4.
 
Just a quick question, when adding a remote device for V4 runtime the auto created Modbus addresses were ones already used earlier in my project. Does this mean we should always create our remote devices first then choose addresses higher up for anything else.
 
Many thanks.
 
Best Regards
Reply 0 0
thiagoralves
Hi Jim, thanks for your kind words! The remote devices system allocates available addresses for the slaves as they are created. When you say those addresses were already used earlier in your code, what are they associated with? Currently the remote devices system is the only system giving addresses to things.
Reply 0 0
Jim Warren
Hi Thigo
I wrote a program to control a raspberry pi in V3 last year and its worked very well, I've recently re written it in V4 and I am experimenting in a spare Pi using V4 runtime, I'm not worried about GPIO at the moment but I left the modbus addresses in that control the GPIO.
When I added a remote device it assigned %IX0.0 and %QX0.0 upwards even though I had %QX0.1 and %Qx0.4 already declared in my code.
I hope that makes sense. I would have liked the remote device further up the address ranges to avoid the already used ones.
 
Best regards.
Reply 0 0
Jim Warren
Hi Jim, thanks for your kind words! The remote devices system allocates available addresses for the slaves as they are created. When you say those addresses were already used earlier in your code, what are they associated with? Currently the remote devices system is the only system giving addresses to things.
By the way my already declared addresses are not global.
Reply 0 0
thiagoralves
IEC locations (%QX, %IX, etc) are global by definition as they are attached to hardware (IO, protocols, etc). When you tie a variable to an IEC location you’re not “using” it, you’re just linking it to a location. The location is effectively used when it is attached to hardware, which is what the remote devices system does. In other words, having a variable placed at %QX0.0 means nothing if there isn’t a hardware at %QX0.0. That’s why when you added remote devices it filled those empty locations, since linking a variable to a location does not make it occupied.
Reply 0 0
Jim Warren
Thanks for the reply, that's not a problem now I know. I can restructure things.
Reply 1 0
Reply