Reading BIT from integer by EWON modbus TCP

Hi,

I need to read separated bits of Interger by EWOM modbus TCP.
I tried to use #, but it couldn’t work, I think due to the old version i’m using (EW_11_3s0). Is there other way to read specific bit? I tried also to use the script option, but also didn’t work.

Thanks,

Yair

Are you using one of the CD series devices or are you using a Flexy? If it’s a Flexy then I’d recommend upgrading to the newest firmware by either going through a recovery or going through the incremental upgrades (12.0 to 13.0 to 14.0 to 14.3) with eBuddy. Once that’s done can you try reading that file again?

Hi,

Yes. It’s an on CD serirs. It’s EWON 2101CD. My client says the firmware is 11.3 and cannot upgrade it because it’s too old.

Yair

Can I try and take a look at this over TeamViewer? I was taking a look at the manual for the CD series devices and it looks like the # bit select should work.

https://s3.amazonaws.com/hms-networks-s3/original/1X/HMS_QS.exe

Hi Tim,

No problem. You need to take over my client computer to see it because the EWON is his. Should I send him the link?

If it’s possible for us to connect to the computer that’s connected to the eWon that would probably be the easiest way to look at this. It seems like there is a pretty big time difference between our locations though. We’re based out of the states in Eastern Standard Time with hours from 8AM-5PM. Where is the client based out of?

Hi,

The client and me based is Israel, which means 7 hours different. I think the best time will be your 8-9 am which means Israel 13-16pm.

Want to try this at 8AM tomorrow morning?

Yes,

I will send the link to my costumer. We talk about your 8am right?

That should work for me if that works for you

In case anybody else runs into this issue, please follow the guide below to read these values through the scripting section

The “#” bit seletor does not work with modbus tags and must be done through BASIC

Hi,

Thank TIM. I wonder, because I tried this guide before I asked you, but it couldn’t work. What did you add for the script?

Thanks,
Yair

Hi Yair,

There were a few things wrong in your code before that the guide above doesn’t make too clear.

image

in the example above, he’s calling a tag called “tag_40001@” not making a call to an individual modbus tag. I think in your example it was called Generator_3@ instead of it being tag_40009@.

Also with the parts underneath, those are all tags that would need to be created before you can write to them. So the error you were getting before was just that these tags didn’t exist.

Also in the BASIC code, it didn’t give any way to call this function, so I went into your init section and wrote:

tset 1,1
Ontimer 1, “Goto Modbus_Write”

the tset 1,1 makes timer 1 and has timer 1 go off every 1 second
Then when the timer goes off it triggers the ontimer function and goes to the Modbus_Write section I made.

Hi Tim,

Thank you very much. I will note it to my self for future needs.

Thanks,
Yair

You’re welcome, let me know if you have additional questions