News:

  • July 01, 2026, 07:42:24 AM

Login with username, password and session length

Author Topic: Casting in a relational contact  (Read 29008 times)

mhw

  • Hero Member
  • *****
  • Posts: 250
Casting in a relational contact
« on: March 12, 2015, 09:49:07 AM »
I am converting an old DL project to DoMore. Memory needs to be available to KEP so I am limited to DLV for variables.  I am unable to cast DLV's as a real number when used in a relational contact. Is this a bug? What are my options? When will we see a KEP driver for DoMore?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3833
    • Host Engineering
Re: Casting in a relational contact
« Reply #1 on: March 12, 2015, 10:52:17 AM »
In Do-more, when you cast to a LARGER size, the ID must ALIGN on that size.  Hence, to cast a 16 bit DLV to a 32 bit REAL, it must align on DWORD, meaning the ID must be EVEN (DLV1400:R or DLV1402:R, but NOT DLV1401:R.

This is the nature of the microprocessor.

Hence, you will have to tweak your memory map of your DLV, aligning any REAL or DWORD sized integers on EVEN DLV IDs.

mhw

  • Hero Member
  • *****
  • Posts: 250
Re: Casting in a relational contact
« Reply #2 on: March 12, 2015, 10:57:34 AM »
That was it. How could you see that from there?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3833
    • Host Engineering
Re: Casting in a relational contact
« Reply #3 on: March 12, 2015, 11:12:25 AM »
How could you see that from there?
We have a full duplex display driver as part of Do-more.  We can write to the display AND read your screen, so we know what you are doing/trying.  It's just a matter of adding extra wires to your VGA cable, just like full duplex RS-232.   ;)

davidbgtx

  • Hero Member
  • *****
  • Posts: 215
  • Host be the Most
Re: Casting in a relational contact
« Reply #4 on: March 12, 2015, 11:16:26 AM »
Not sure what version of KEP you are using. I am using KEPServerEX, which has a MODBUS/TCP driver. So I use Publish and Subscribe to convert Do-More Real values to Modbus Floats. See example pics. Hope this helps.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Casting in a relational contact
« Reply #5 on: March 12, 2015, 11:20:47 AM »
That was it. How could you see that from there?

Don't let Mark creep you out with the "NSA is watching you stuff". Although we can reverse your monitor and see in your office, we choose not to do so, and instead rely on our clairvoyance. Actually...there's pretty much only one thing that keeps it from working.

You can also use PUBLISH and SUBSCRIBE to move to and from unaligned public memory to aligned memory.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

ADC Product Engineer

  • Hero Member
  • *****
  • Posts: 270
Re: Casting in a relational contact
« Reply #6 on: March 12, 2015, 02:59:43 PM »
I'll poke the ADC KepDirect Product Manager and see what is up with development on the Do-more front.  He is out of the office today so it might be next week before I have an answer.  If I forget to answer back, you know how to reach me Mike.

mhw

  • Hero Member
  • *****
  • Posts: 250
Re: Casting in a relational contact
« Reply #7 on: March 13, 2015, 10:58:01 AM »
Quote
I'll poke the ADC KepDirect Product Manager and see what is up with development on the Do-more front.
Thanks Richard. It will be too late for this project unless it is coming out tomorrow.
Quote
Don't let Mark creep you out with the "NSA is watching you stuff".
I'm not worried...I wrapped my head in aluminum foil so he can't get to me.

Unrelated question.
In this project I will be doing DLRX's and DLRW's to 3 different 06's that are being used as dumb IO. Should I create a separate device for each? Or maybe my question should be, what is the fastest way with the least network overhead to exchange data with them?

plcnut

  • Hero Member
  • *****
  • Posts: 814
    • premiersi.com
Re: Casting in a relational contact
« Reply #8 on: March 13, 2015, 11:05:57 AM »
Definitely make a separate device for each one.
Circumstances don't determine who we are, they only reveal it.

~Jason Wolthuis
Premier Systems Integration, LLC
http://premiersi.com

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Casting in a relational contact
« Reply #9 on: March 13, 2015, 02:09:57 PM »
Definitely make a separate device for each one.

Yes...although since DLRX/WX user UDP, the difference is not nearly as dramatic as TCP.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: Casting in a relational contact
« Reply #10 on: March 16, 2015, 02:53:17 PM »
mhw, I sometimes let franji1 borrow my tech service palantir. As anyone who's ever worked in technical service will tell you, it is a necessary device for those occasional customers who send you an email and say NOTHING but, "Hey, my stuff is broke. What's wrong with it? Thanks!"
There are two types of people in the world; those that can extrapolate from incomplete data sets.

mhw

  • Hero Member
  • *****
  • Posts: 250
Re: Casting in a relational contact
« Reply #11 on: April 09, 2015, 11:33:42 AM »
Quote
Yes...although since DLRX/WX user UDP
So when I configure a new device I should create a UDP connection?
If yes, then is the port the same thing as module ID?
Is it important to setup the peer to peer in the ECOM's?
 

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6164
  • Yes Pinky, Do-more will control the world!
Re: Casting in a relational contact
« Reply #12 on: April 09, 2015, 01:35:13 PM »
So when I configure a new device I should create a UDP connection?

No. UDP devices are used only for custom protocols. The issue being discussed was related to connection oriented clients where to talk to multiple things with the same device requires a connect/disconnect cycle for every comm. For unconnected client (like DLRX/WX) there is no performance penalty to use a single device to talk to multiple things.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Greg

  • HostTech
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 702
  • Hmmm...
    • Host Engineering, Inc.
Re: Casting in a relational contact
« Reply #13 on: April 09, 2015, 02:21:56 PM »
Is it important to setup the peer to peer in the ECOM's?
Yes, if you are using an ECOM/ECOM100 in the Do-more (instead of the onboard Ethernet port) as the client (master). In this case, then in the DLRX/DLWX instruction you want the "Slave ID" parameter to match the "RX/WX Device Number" in your Peer-to-peer table entry.
« Last Edit: April 09, 2015, 02:26:37 PM by Greg »
There are two types of people in the world; those that can extrapolate from incomplete data sets.

mhw

  • Hero Member
  • *****
  • Posts: 250
Re: Casting in a relational contact
« Reply #14 on: April 15, 2015, 04:59:23 PM »
I am confused..
This was my original question:
Quote
I will be doing DLRX's and DLRW's to 3 different 06's that are being used as dumb IO. Should I create a separate device for each? Or maybe my question should be, what is the fastest way with the least network overhead to exchange data with them?

And my responses were:

Quote
Posted by: plcnut 

Insert Quote

Definitely make a separate device for each one.

and

Quote
Posted by: BobO 

Insert Quote


Quote from: plcnut on March 13, 2015, 10:05:57 am

Definitely make a separate device for each one.


Yes...although since DLRX/WX user UDP, the difference is not nearly as dramatic as TCP.

So from those responses I assume that I need to make a new UDP device, but..

Quote
Posted by: BobO 

Insert Quote


Quote from: mhw on April 09, 2015, 10:33:42 am

So when I configure a new device I should create a UDP connection?


No. UDP devices are used only for custom protocols. The issue being discussed was related to connection oriented clients where to talk to multiple things with the same device requires a connect/disconnect cycle for every comm. For unconnected client (like DLRX/WX) there is no performance penalty to use a single device to talk to multiple things.

So back to my question worded in a different way. What is the fastest way with the least network overhead to exchange data between multiple H0-ECOM100s and the onboard Ethernet port of a DoMore?