222.100 datatype on 6 bytes - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10) +--- Thread: 222.100 datatype on 6 bytes (/showthread.php?tid=1017) Pages:
1
2
|
222.100 datatype on 6 bytes - domotiqa - 27.09.2017 Hello, I need to handle a 6 bytes value from KNX CIAT heating actuator (3 setpoint in one variable confort/eco/standby). Then to put it to Bacnet for comptible Bacnet device. I want to use Spacelynk for that (Schneider project), but this datatype missed ! Can I use bigger datatype ?? Waht solution ? regards http://dz.prosyst.com/pdoc/mBS_SH_SDK_7.3.0/modules/knx/api/com/prosyst/mbs/services/knx/dpt/DPTTempRoomSetpSetF16.html Code: DPT_TEMPROOM_SETP_SETF16_MINOR DPT minor type 222.100 RE: 222.100 datatype on 6 bytes - domotiqa - 27.09.2017 Maybe I can use something like this with dstraw: Code: require('genohm-scada.eibdgm') then put decoded 6 byte value to 3 different 2 bytes value (in new varaible) and to check export for bacnet. However, how can I do from bacnet, then reencode to 6 bytes.... RE: 222.100 datatype on 6 bytes - Erwin van der Zwart - 27.09.2017 Hi, Create a 255 byte object (1/1/1 in this sample) and link it to the address of your 6 byte value that you use in the ETS and attached this script to it: Code: if event.src ~= 'local' then That will give you the 3x 2 byte float objects that you can export to BACnet. Attach a tag to the 3x 2 byte float objects and create a event based script attached to that tag and paste this script in it: Code: if event.src == 'local' then This will write the (BACnet side) changed value back to your 6 byte object. Because i added event.src you can use the same 255 byte object for incomming and outgoing telegrams and avoid triggering a loop. BR, Erwin RE: 222.100 datatype on 6 bytes - domotiqa - 28.09.2017 Ok thank you a lot, your product still has surprise ;-)) First solution (only put the variable without process on Spacelynk) So if I understand well I could also use the 255 byte object for my 6 bytes knx object from CIAT. Then I just put it as export (for bacnet), the high level supervision could use this variable (and process it self to separate byte) ! What I don't know is when sending on knx bus, we send 256 bytes object, is it not a problem on KNX device Ciat which is waiting for a 6 bytes value ? Second solution: use your script then divide in 3 variable exported in bacnet I don't understand your trick: This will write the (BACnet side) changed value back to your 6 byte object. Because i added event.src you can use the same 255 byte object for incomming and outgoing telegrams and avoid triggering a loop. RE: 222.100 datatype on 6 bytes - Erwin van der Zwart - 28.09.2017 Hi, 1) No i checked this in the ETS monitor and the value is a 6 byte value like $0C $D2 $0C $D3 $0D $C2 and not like $00 $00 .. $0C $D2 $0C $D3 $0D $C2 so all unused bytes in the 255 bytes are not send at all, making it a valid value (in 222.100 format) for your 6 byte object. 2) Because you send the value from KNX to the 6 byte it will only repond to split it to 3 bytes when it's from KNX and not when comming from local source (not from spaceLYnk), when you update the 255 byte object by the write from BACnet action it normaly would split the values again and create a loop, now it doesn't (: BR, Erwin RE: 222.100 datatype on 6 bytes - domotiqa - 28.09.2017 great, I prefer to use the Spacelynk only as bridge without processing (for maintenance issue), and let Schneider process variable on AS automate server (used in CVC). I have the second solution with your script as backup if it fail !! Thank you again ! RE: 222.100 datatype on 6 bytes - Erwin van der Zwart - 28.09.2017 Hi, I don't think you can do it without my script, there is no way to set the string object (or any other higher then 4 byte object) directly to the AS-P by BACnet as it only supports analog and binary values. This means you need to use the split to the 2 byte float objects in the spaceLYnk to get them in the Automation Server... BR, Erwin RE: 222.100 datatype on 6 bytes - domotiqa - 28.09.2017 good to know... So I will have to automate script for the 50 CIAT HVAC cool lol RE: 222.100 datatype on 6 bytes - admin - 28.09.2017 If you have some specific addressing rules you only need two scripts mapped to tags RE: 222.100 datatype on 6 bytes - domotiqa - 29.09.2017 you mean something like this: ga = event.dst value = event.getvalue() then use adress+1 , adress +2, adress +3 for the separate byte ?? With knx->bacnet ok use tag knxBac and for bacnet->knx use tag bacKnx (but to know the original 6 Byte address, it will be hard) RE: 222.100 datatype on 6 bytes - Erwin van der Zwart - 29.09.2017 Hi, I think we can do it with a single tag for each thermostat and a smart object structure, or with a triple tag on the object like ‘SPLIT, T1, 6B’ and ‘SPLIT, T1, SP1’ so SPLIT is event, T1 defines thermostat and 6B, SP1, SP2, SP3 defines object , i think we also can merge the 2 scripts to one that way, i will check this later (: BR, Erwin RE: 222.100 datatype on 6 bytes - admin - 29.09.2017 My idea was to have 6-byte objects addressed starting from 3/1/0 and 2-byte object addressed starting from 3/2/0. Then you can get 2-byte addresses from 6-byte address like this: Code: addr = event.dst And get 2-byte addresses and 6-byte address from 2-byte address like this: Code: addr = event.dst Then you just map different tags to 2-byte and 6-byte objects and use Erwin's conversion script. It can be simplified a bit by using event.datahex instead of using getvalue/strtohex conversion. RE: 222.100 datatype on 6 bytes - domotiqa - 29.09.2017 cool, great idea ! Your a genious ! I would not have this idea at all !!! So for my script if I tag all 6byte with "knxBacnet" and a script: Code: if event.src ~= 'local' then and another with tag "bacKnx" Code: if event.src == 'local' then But I don't understant your point of view about the "event.datahex" Quote:It can be simplified a bit by using event.datahex instead of using getvalue/strtohex conversion. RE: 222.100 datatype on 6 bytes - admin - 29.09.2017 You can replace this: Code: value = event.getvalue() With just this: Code: value = event.datahex RE: 222.100 datatype on 6 bytes - domotiqa - 29.09.2017 cool, and my script above look's right ? RE: 222.100 datatype on 6 bytes - admin - 29.09.2017 Yes, but remove log() calls as they are not needed. RE: 222.100 datatype on 6 bytes - domotiqa - 29.09.2017 thank for helping RE: 222.100 datatype on 6 bytes - Erwin van der Zwart - 29.09.2017 Nice end result (: Thanks Admin for filling in the final perfection! BR, Erwin RE: 222.100 datatype on 6 bytes - domotiqa - 02.10.2017 Thanks both of you. LM still is surprising after 5 year I'm using it ;-)) RE: 222.100 datatype on 6 bytes - domotiqa - 02.10.2017 Looks like the import from ESF file of the 6 byte doesn't process. Do you have idea to import all of them to 256 bytes ? Should I create another project, put known datatype object tempory to the group adress , thenimport or do you have a trick |