Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Arif

Pages: [1]
1
Open Discussion / user defined modbus function code
« on: April 08, 2019, 03:03:40 AM »
i'm new to ahmi, while i understand basic operations, i want to ask

Im expecting 12 byte structured data from each write/read from user-defined fc, it's for personal project so im not bothered by performance or anything
I know i can use something like "66:0001" in PlcAddress, and I wonder if it can be done like this
Code: [Select]
Dim tmp As CustomStructure
Dim tmp2 As String() = TCPCom1.Read("65:0001", 6) '*assuming each element 16bit
tmp.el1 = tmp2(0) >> 8
tmp.el2 = tmp2(0) & 0xFF
tmp.el3 = tmp2(1)
...
does each tmp2(x) represent a byte? or short?
can i use TCPCom1.Read("65:0001", 1) and still expect 12 byte?

also, in modbus tcp driver, there's DataReceived event
can i use this to receive alarm or notification from device when there's value change or input? so ahmi doesn't need to poll data

for example the notification looks like this:
mbap header
function code
byte count
alarm type
data

2
Open Discussion / Re: multi slave subscribe
« on: October 18, 2017, 02:25:44 AM »
thanks archie :)
oh, and one more thing. What exactly the datasubscriber2 data return? I noticed I can input several address range at PLAddressValueItems. can I get Boolean array on one range and integer array on another?

3
Open Discussion / multi slave subscribe
« on: October 17, 2017, 02:53:00 AM »
I'm trying new project for myself with advancedHMI where I connect 4 plc through RS485 to get data array (each different length).

which method will be the best?
Set up driver for each slave, and then pair Datasubscriber2 to get data; OR
Set up one driver, then cycling the config after it receive some data.


Pages: [1]