Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: fluidpowerman on October 14, 2013, 06:16:21 PM

Title: using Domore DLV memory and keptdirect quick client to log data
Post by: fluidpowerman on October 14, 2013, 06:16:21 PM
I have and application where I am logging data from the Domore to Kept direct and ultimately to Datanet enterprise. The values I am trying to collect are Pressure, length, and a job reference which will include, letters and numbers "ie.  Y53472q.  Currently I can connect with to the do-more with the kept direct and using the quick client I can see the value, but my dilemma is I only see the whole number and not the decimal values.  I am using the move function to move the R - real number value to the DLV memory location. I understand that the DLV is octal.  I was hoping someone can shed some light on this for me.  First how I can source the complete value (including decimals and how I cold structure the job reference (letters and numbers) so I can see it on my quick client and ultimately the datanet enterprise.  Thank you in advance to all the Geniuses out there who can take the time to help.  ;D
Title: Re: using Domore DLV memory and keptdirect quick client to log data
Post by: b_carlton on October 14, 2013, 06:29:51 PM
Break apart the data you wish to collect. Detail each one - for example

Pressure - Real Number - minimum to maximum readings
Length - Real Number - minimum to maximum readings
Job reference - Single ASCII Character - 'a' - 'z'

These can be stored individually in DLV registers and the KepDirect can acquire them one at a time. KepDirect would have to know where each value starts and the type of information. The data would then be ready as individual items for upper level processing.

Another method would be to create a 'string', a sequence of characters containing all the information, much like your 'Y53472q'. The KepDirect could acquire it as a string, assuming it knew where the string started and its length, and pass it up to higher level processes which may break it apart into its individual components. One problem with a string is to keep some kind of structure so it can be easily broken apart again. This could entail spaces between the individual pieces of information or some other character, like a comma.
Title: Re: using Domore DLV memory and keptdirect quick client to log data
Post by: MikeS on October 15, 2013, 09:57:40 AM
if you are moving a value from an R register (32-bit real value with decimal point) to a DLV register (16-bit unsigned value) the real value will be truncated - you will lose the decimal point and the numbers to the right of the decimal point.

in the move instruction user something like Move R152 DLV152:RD, the ":RD" means will move the floating point value in R152 to two successive DLV locations (DLV152 & DLV153) and retain the bit pattern of a floating point number. KEPDirect will then need to read DLV152 and DLV153 as a floating-point DWORD as well.

i'm not sure how best to handle the single ASCII character ... i'll ask around and get back to you
Title: Re: using Domore DLV memory and keptdirect quick client to log data
Post by: fluidpowerman on October 15, 2013, 01:14:23 PM
Gentleman, Thank you so much for your help and intellect.  I have a lot to learn about pointers, how to map data, and understanding the types of data as well.  I will try the Move R152 to DLV152:RD and then access the DLV152 and DLV153 into the datanet enterprise.  Any additional help with how to handle the combination of numbers and ascii characters is Greatly appreciated.  sample program code on how to map this data or resources to study is appreciated as well.  The job reference “Y53472q” will be used as a “key” in my database to link the correct the pressure and length information logged to the correct job.  I will follow up and post my results ….thanks again
Title: Re: using Domore DLV memory and keptdirect quick client to log data
Post by: plcnut on October 15, 2013, 02:21:02 PM
Check out the STRGETB command for moving your alphanumeric data from a String into DLV memory.