0
Under review

Use Bits out of Holding Register Beckhoff Modbus TCP

Jarryd Milissa 9 jaar geleden in Products / Modbus bijgewerkt door Ekaterina (head of support) 9 jaar geleden 4
Hello,

i'm searching how i can communicate with mij ipad with iridium mobile and my beckhoff cx8090 controller for a building automation project.

i'm searching for a simple way to control bits that i wanna use to control some lights etc...
but i don't wanna control the hardware outputs immediately , i first wanna control this request in the program with other conditions before i set the hardware outputs.

but i can't find how i set virtual variables from iridium to beckhoff.
from what i found now i think this has to me written in the holding registers 3000 and 4000 of modbus

so i made a variable in beckhoff as you can see in image below:


Image 8491

and then i made in iridium next variable in the modes tcp driver:


Image 8489


Image 8490


this works fine an the value in beckhoff of holding out[3] and holding out[4] changing when i change in iridium.

but this isn't what i exactly want because i wanna sen bit command separately
for example :

button light 1 => set bit 1 in beckhoff


sound simple but i can't find how to do this,


i hope someone can help me with this or has example how to test this


thanks a lot
Jarryd


no one that has some example or can help me with this?

thanks a lot
Hi Jarryd,

your first post was on a friday (after work hours for my time zone) and you asked for help again on a saturday. In my experience you will always get an answer and it will usually be fast, but it will mostly be between working hours.

I don't have experience with beckhoff equipment, but i do work with modbus.
Generally, setting bits is done by setting coils. Discrete inputs are also set as bits. would this be a possibility for you? Setting individual bits of a holding register can be done, but it isn't the most straightforward way and is more error prone as you would probably have to send the whole dword whenever one bit changes.
i would preffer also sending bit by setting coils but i for what i tested it seems i only can set the hardware outputs of the real IO and not "Virtual" IO that i can use in the program as a condition. if this can be used also for "Virtual IO this would be great and then it wouldn't be so difficult like splitting up the words of holding registers.

Thanks a lot
Under review
separate bits - rw.irpz - to read and write separated bits in Modbus
separate bits - read.irpz - to read only

It is possible only via the script, and this method is not an ideal becouse the native data and Script data works in the different streams, but hope u can use this sample