Casting of Data Types
Hi All ,
I want to know if casting of data types is possible in ABAP. I mean if I have declared a datatype as
data : x type char5.
and Now I want to make x as char10.
Is there any method to achieve this?
Thanks and regards
Sujeet
Hi Sujeet
If your requirement suits, you can use dynamic programming which is a nice feature of ABAP.
You can use field-symbols (think them of as aliases for fields) or generic variables.
For more information I recommend the e-class <a href="https://www.sdn.sap.com/sdn/elearning.sdn?class=/public/eclasses/teched04/ABAP351.htm">"Advanced and Generic Programming in ABAP"</a>.
As a last thing, let me introduce you the SDN forums pointing system: You can assign points to posts which help you solving your problem. You can reward points by clicking the yellow star icon at header of each post. You can assign:
- one 10 points (solved)
- two 6 points (very helpful answer)
- many 2 points (helpful answer)
Kind regards...
*--Serdar
Similar Messages
-
Convert/Cast string data type from file to DT_GUID into table
Hi to all
is there anyone who help me please?!?
I'm not able to resolve the following problem.
I have a .csv file with a string field A and its values are GUID.
I must export this .csv file into SQL Server Table which have a uniqueidentifier (GUID) field B.
I must map string field A to GUID field B of table.
But I get an error like this: "Error at Data Flow Task [Derived Column [xxx]]: Error code 0x800401F3 occurred attempting to convert from data type DT_WSTR to data type DT_GUID.".
I read other posts like this in this forum and i also tried the solution suggested in those posts.
The proposed solution had suggested of insert in the expression field of "Derived Column" Transformation this expression (DT_GUID) ("{" + [YourGuid] + "}") in place of (DT_GUID) [YourGuid].
But i get always the same error.
is there anyone who help me please to resolve this issue?!?The derived column expression should work if the yourGuid column contains a real guid.
Does the source looks something like: 25892e17-80f6-415f-9c65-7395632f0223
And are all rows filled with a correct value or are there also empty strings or null values?
Please mark the post as answered if it answers your question | My SSIS Blog:
http://microsoft-ssis.blogspot.com |
Twitter -
Casting a date type into sql.date
Hi there ...I trying to cast this sentences...please help me out...thanks
sentencia.setInt(4,Integer.parseInt(request.getParameter("FECHA_INICIO")));
sentencia.setInt(5,Integer.parseInt(request.getParameter("FECHA_FIN")));
both of them are date and the values wii go into a database on oracle...im working wuth jsp too..If you need to insert a date, why are you creating an int from a string and using setInt()?
Create your Date object from the request parameters and use setDate() instead. -
Casting a date == type C
Hi,
Can anyone tel me the syntax to convert a date (Or number) to string.
Thank you in advance.
MustaphaHi,
Just create a var and use WRITE <var_date> TO <var_char>. -
Getting Incorrect data type error while trying to do a CAST in table
Getting an error while trying to compile the following piece of code
CREATE OR REPLACE PACKAGE BODY A_pkg AS
FUNCTION A(O_error_message IN OUT varchar2)
RETURN BOOLEAN IS
--Declaring the local variables and CURSORs used in the program unit
L_attrib_tbl CFA_SQL.TYP_attrib_tbl;
cursor c1 is
select list_first1.number_11
from TABLE (CAST (L_attrib_tbl AS "CFA_SQL.TYP_attrib_tbl")) list_first1;
BEGIN
L_group_id = '22'
IF L_merch_type_value = 'G' OR L_merch_type_value = 'I' THEN
CFA_SQL.QUERY_ATTRIB(L_attrib_tbl,
L_group_id) ;
END IF;
open C1;
Fetch C1 into L_number;
close C1;
return true;
END A;
END;
Also pasting the Spec for CFA_SQL which contains TYP_attrib_tbl
TYPE TYP_attrib_rec IS RECORD
group_id CFA_ATTRIB_GROUP.GROUP_ID%TYPE,
varchar2_1 VARCHAR2,
number_11 number(10,0));
TYPE TYP_attrib_tbl is TABLE of TYP_attrib_rec INDEX BY BINARY_INTEGER;
The error is coming in the line
cursor c1 is
select list_first1.number_11
from TABLE (CAST (L_attrib_tbl AS "CFA_SQL.TYP_attrib_tbl")) list_first1;
with the error as Invalid data type pointing to CFA_SQL.TYP_attrib_tbl as invalid, but I have initialized L_attrib_tbl as of that datatype only. Ahy help would be greatly appreciated.
Regards,
JoydeepHi Kelly,
There is no data that is entered in that period.The data will be entered for that period next month.
POV is also not set to that period,but still the problem persists.
Thanks -
Help needed in data type casting
I have a java program which will receive data and its type in the String format. During program execution, the data in the String data has to be converted into the respective data type and assigned to a variable of that data type so that it could be used in the program. Programmer may not know the type of data that the value has to be converted into.
I really got struck up with this. This is a RMI application and one process node is sending the data to another node in the String format and the type of data it should get converted into so that it can be converted into the respective type and used for computation.
Can you understand what I am asking for ....if you can pls help and it is highly appreciatedI dont know whether i ahve expressed it correctly
look at this code
dataPacket sendtoNode = send.senDatatoNode(inputReq);
String recnodnum = sendtoNode.nodeNum;
String recvarnum = sendtoNode.varNum;
String recvartype = sendtoNode.dataType;
String recvalvalue = sendtoNode.dataVal;
int num; int type;
double result;
// here in this case the result variable type is double
if (recvartype.equals("int")){
type = 1;
result = Integer.parseInt(recvalvalue); will pose problem
else
if (recvartype.equals("double")){
type = 2;
result = Double.parseDouble(recvalvalue);
else
if(recvartype.equals("float")){
type =3;
result = Float.parseFloat(recvalvalue); will pose problem
else
if(recvartype.equals("Boolean")){
if ((recvalvalue.equals("true")) || (recvalvalue.equals("TRUE")))
type = 4;
result = Boolean.parseBoolean(recvalvalue); will pose problem
else
if(recvartype.equals("char")){
type = 5;
result = (char)recvalvalue; will pose problem
else
if(recvartype.equals("String")){
type = 6;
result = recvalvalue; will pose problem
else
if(recvartype.equals("byte")){
type = 7;
result = Byte.parseByte(recvalvalue); will pose problem
else
if(recvartype.equals("long")){
type = 8;
result = Long.parseLong(recvalvalue); will pose problem
else
if(recvartype.equals("short")){
type = 9;
result = Short.parseShort(recvalvalue); will pose problem
//forvarval varvalue = new forvarval();
//varvalue.forvarval(recvartype, recvalvalue);
// this has to be done after sorting the problem of type casting string result = recvalvalue;
//result = value; //<this will surely give me a problem as i m assigning string to double>??
send.host(result);
System.out.println("result received and the result is " +recvalvalue );
now i need to assign the converted string in to a variable and use in the compuation ..thts where the challenge n not in teh conversion process... -
CAST Not working for me - Arithmetic overflow error converting int to data type numeric - error
GPM is DECIMAL(5,2)
PRICE is DECIMAL(11,4)
COST is DECIMAL(7,2)
Trying to update the Gross Profit Margin % field and I keep getting the "Arithmetic overflow error converting int to data type numeric" error.
UPDATE SMEMODETAIL SET SMD_GPM = (SMD_PRICE-SMD_COST) / SMD_PRICE * 100
FROM SMEMODETAIL WHERE SMD_PRICE<>0 AND SMD_QUANTITY<>0
Example record:
SMD_PRICE SMD_COST GPM%
1.8500 1.62 12.4324324324324300
I added cast and I still get the error.
How do I format to get this to work?
Thanks!Hi GBerthume,
The error is caused by some value such as 1000.01 of the expression (SMD_PRICE-SMD_COST) / SMD_PRICE * 100 exceeds the
precision of the column(DECIMAL(5,2)). The example data doesn't cause the overflow error for the value of the expression is 12.43 which is in the scope of DECIMAL(5,2).
USE TestDB
CREATE TABLE SMEMODETAIL
SMD_PRICE DECIMAL(11,4),
SMD_COST DECIMAL(7,2),
SMD_GPM DECIMAL(5,2)
INSERT INTO SMEMODETAIL(SMD_PRICE,SMD_COST) SELECT 1.8500,1.62
UPDATE SMEMODETAIL SET SMD_GPM = (SMD_PRICE-SMD_COST) / SMD_PRICE * 100
FROM SMEMODETAIL WHERE SMD_PRICE<>0-- AND SMD_QUANTITY<>0
SELECT * FROM SMEMODETAIL
DROP TABLE SMEMODETAIL
The solution of your case can be either scale the DECIMAL(5,2) or follow the suggestion in Scott_morris-ga's to check and fix your data.
If you have any question, feel free to let me know.
Eric Zhang
TechNet Community Support -
I am implementing synonym in a database to pass-thru to another database to replace an existing table.
E.g. CREATE
SYNONYM [dbo].[Table1]
FOR [server1].[database1].[dbo].[Table1]
I am getting an error such as below when I try to deploy it with vsdbcmd tool as below:
vsdbcmd /Action:Deploy /dsp:SQL /p:TargetDatabase=database1 /ManifestFile:"deploymanifest" /Script:"database1.sql"
CAQuietExec: An unexpected failure occurred: Unable to cast object of type 'Sql100Synonym' to type 'Microsoft.Data.Schema.Sql.SchemaModel.ISqlColumnSourceBase'.
I can't find anything related to this error on the net. I appreciate any help on this.
Thanks,
KeithHello Keith,
Your issue seems related to deploy some database, is it SSDT deployment? It seems VS General is not the right forum for your case, please choose the right forum for your case, like SSDT forum.
I read your post and it seems your 'Sql100Synonym' does not meet the type requirement, what's it in your project? What do you want to deploy?
Best regards,
Barry
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click
HERE to participate the survey. -
hi Experts,
while running SQL Query i am getting an error as
The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. for the query
select T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
T2.LineText
from OQUT T0 INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry INNER JOIN
QUT10 T2 ON T1.DocEntry = T2.DocEntry where T1.DocEntry='590'
group by T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
,T2.LineText
how to resolve the issueDear Meghanath,
Please use the following query, Hope your purpose will serve.
select T1. Dscription,T1.docEntry,T1.Quantity,T1.Price ,
CAST(T2.LineText as nvarchar (MAX))[LineText]
from OQUT T0 INNER JOIN QUT1 T1 ON T0.DocEntry = T1.DocEntry LEFT OUTER JOIN
QUT10 T2 ON T1.DocEntry = T2.DocEntry --where T1.DocEntry='590'
group by T1. Dscription,T1.docEntry,T1.Quantity,T1.Price
,CAST(T2.LineText as nvarchar (MAX))
Regards,
Amit -
Hi,
I am facing one issue while working with SelectOneChoice along with Custom Domain data type. Sample app to simulate the issue is available at http://www.filejumbo.com/Download/6FDF6ECF2922BD24
Issue Details.
Base view object’s attribute is of type CustomString, for which another static VO’s attribute is attached as LOV. LOV attribute is of type String. Because of this data type mismatch between LOV VO attribute and Base VO attribute, while working in screen, initially we were facing Class cast exception.
Cannot convert <<LOV Attr. Val.>> of type class java.lang.String to class model.domain.common.CustomString This is not only for this type of SelectOneChoice but also for InputText field whose underlying VO attribute is of type CustomString (i.e. any Custom Domain type)
On raising this in Jdeveloper forum, I came to know that adding a default oracle converter against the UI Component will take care of converting to respective data type. After added the converter for InputText and SelectOneChoice components, this issue got resolved. This was our lesson while working in Jdeveloper version 11.1.1.3.0. Converter we used,
<f:converter converterId="oracle.genericDomain"/> When we try the same scenario in Jdev Version 11.1.1.4.0, without having the oracle converter itself, SelectOneChoice started working fine!! (i.e. it is able to set the base attribute with LOV attribute’s value but with proper base attribute’s domain data type). Anyhow, converter is required for InputText.
When we try the same scenario in Jdeveloper new version 11.1.2.0.0, it started giving class cast exception when we don’t have oracle converter for SelectOneChoice. But by adding it, though it didn’t give such class cast exception message, though a selection is made in SelectOneChoice, VO attribute has not been updated with the new value. Instead it is updated with null value (Checked the setter method of view row impl by having break point) . Because of this, after a selection is made, when we try to read the attribute value from VO on button click, VO attribute always returns null.
We have also tried our own converters but there is no change in the behavior.
The above misbehavior can be tested either by having SOP programmatically or by refreshing the SelectOneChoice by giving its id as Partial trigger to itself with autosubmit set to true, so that the selected value will be reset to null irrespective of the selection made.
For convenience, Issue details with Sample application is shared. Shared link : http://www.filejumbo.com/Download/6FDF6ECF2922BD24
Shared folder contains
1. Sample App developed on Jdev 11.1.1.4.0 to ensure it didn’t give this error.
2. Sample App developed on Jdev 11.1.2.0.0 to simulate this error.
3. Error details in a document.
Can anybody have a look at this and tell me why this misbehavior and is it a bug? If so, any workaround available to continue the development?
Thanks in Advance.
Raghu
Edited by: Raguraman on Sep 10, 2011 10:31 AMSorry for the late reply John and Frank. Ya i did. Thank you.
One more detail:
I tested the behavior in Jdeveloper 11.1.2.0.0. The recent surprise is Select One Choice is behaving perfectly when it used in Grid layout and fail to work when it is form layout. I am getting surprised why behavior of component varies based on the way it refers the binding.
for form layout,
value=#{bindings.
for grid layout,
value=#{row.bindings.
The bug details (#/title) are Bug 12968871 - RUNTIME CONVERSION FAILURE WHEN USING CUSTOM DOMAIN OBJECT VALIDATION IN EO
Edited by: Raguraman on Sep 12, 2011 8:23 PM
Edited by: Raguraman on Sep 12, 2011 8:31 PM -
Join columns of different data types
Can i join two columns of different data types in a single statement. Is there any cast or convert statement
SELECT B~PARTNER AS RESP_GROUP
FROM BUT000 AS B
INNER JOIN CRMV_LINKPARTNER AS C ON BPARTNER_GUID = CPARTNER_NO.
Here PARTNER_GUID is Raw 16 and PARTNER_NO is Char 32, the query is not returning any rows.
Thanks
Akila.RHi!
Basically we can say, you can't join them, but you might try this way:
SELECT B~PARTNER AS RESP_GROUP
FROM BUT000 AS B
INNER JOIN CRMV_LINKPARTNER AS C ON BPARTNER_GUID = CPARTNER_NO(16). "add
(16)
Or an other version
C~PARTNER_NO+16(16) "depends on, where is the real number stored
Regards
Tamá -
Hi everyone,
With the next release (to go out on Monday) we're adding proper date format support in liquid for all modules. Besides all the improvements and additions made available with this release, one important note, which requires you to do some updates after the release, is that we're breaking backwards compatibility for liquid date tags by outputting the dates in ISO 8601 format ("yyyy-MM-ddTHH:mm:ss") instead of current format(“yyyy-MM-dd”).
Here is a brief overview of the changes:
All module fields which represent date or date times are now passed to Liquid as date time objects (previously they were passed as strings). This brings the following benefits:
Comparison between date time objects works correctly
It is possible to compute the difference between two date time objects using the minus filter. Example: {% assign dateDiff = Globals.Site.DateNow| minus: myDate %}
We added the means for obtaining the current date time: Globals.site.dateNow. The returned date is in the site’s time zone.
By default, when no filter is applied, all date variables will be output in the following ISO 8601 format: “yyyy-MM-ddTHH:mm:ss”. For example {{ myDate }} would output something similar to: “2014-12-12T07:19:49”. (Note: this is a backwards compatibility breaking change, as previously we outputted dates using the following format: “yyyy-MM-dd”. The breaking change only affects Liquid tags). Following the release, you should update your sites using the provided date filters to format the dates as you need.
The output of date time variables can be formatted using the following filters:
date (with no parameters)– displays a nice to read string representing just the date part from the date time variable. The date is formatted in the site’s culture. This compatible with the way older BC tags display dates. For example {{ myDate | date }}, in the English US culture will output a string similar to: “12-Dec-2014”.
datetime (new filter) – displays a nice to read string of the date time variable using the site’s culture. This compatible with the way older BC tags display date time. For example {{ myDate | datetime }}, in the English US culture will output a string similar to: “12-Dec-2014”.
date “format” (existing filter, nothing updated, mentioned here just for consistency) – displays the date in the site’s culture using a format specified by the format variable. The list with the available formats is available here: http://msdn.microsoft.com/en-us/library/8kb3ddd4%28v=vs.110%29.aspx. Note that the date filter can also be used to format objects that result as a difference between two date time objects, however, in this case the format string will respect a different set of rules as defined here: http://msdn.microsoft.com/en-us/library/ee372287%28v=vs.110%29.aspx. The following example demonstrates how to display just the number of days in the difference between two dates: {{ Globals.Site.DateNow| minus: myDate| date: "%d" }}
We added the Convert filter which can be used for converting variables to a certain type. The syntax is: variable | convert: “type”. Below are the values supported by the type parameter:
“date” – converts a variable to a date time instance. We only support the following formats for strings that are converted to date time: “yyyy-MM-ddTHH:mm:ss” and “yyyy-MM-dd”.
“number” – converts a variable to a number instance. If converting from string, only period “.” is supported as a decimal separator. This filter will probably be most useful when trying to convert GET query parameters: {% assign pageNumber = Globals.get.pageNumber | convert: “number” %}. The previous example assumes that URL that loaded the page contains a parameter named pageNumber. The convert numeric filter is an alternative to the rather hack-ish approach of converting to numbers using mathematical operators: {% assign myNumber = variable | plus: 0 }. Please note that it is not recommended to use the convert numeric filter just to assign numeric constants. For example, this approach is not recommended: {% assign myNumber = “3.14” | convert: “number” %}. Use the following approach instead: {% assign myNumber = 3.14 %} (note the lack of quotes around 3.14 in the second example).
“boolean” – converts a variable to a boolean instance. Please note, that just as it is the case with numerics, it is not recommended to use the “boolean” filter for declaring a boolean constant. For example this is not recommended: {% assign myBool = “false” | convert: “boolean” %}. Use the following syntax instead: {% assign myBool = false %}
“string” – converts a variable to its string representation.
We added implicit casting to the most relevant type in comparisons and inside filters representing mathematical operations (plus, minus, times, divide, modulo). With implicit casting, if one of the two operands is of type string and the other is of a different type (for example numeric or date time), we will attempt to convert the string operand to the type of the other. The conversion will fail if the string is not in an appropriate format for the type it is converted to (same rules as in the Convert filter are applied). In comparisons, if the implicit casting fails, the comparison is made with both operands converted to strings. Additional notes:
Implicit casting allows using date time literals directly in comparisons if the other operand is of date time type. For example, this will work correctly since "2015-01"15" will automatically be converted to date time before making the comparison: {% if myDate > "2015-01-15" %}Some message{% endif %}
Date parts obtained using the date filter can be used directly in comparisons with numerics. For example:
{% assign daysDiff = Globals.Site.DateNow| minus: myDate| date: "%d" %}
{% if daysDiff < 10 %}
A message
{% endif %}
With the implementation of implicit casting we also fixed some rather funny bugs related to comparisons and mathematical operations. For example, previously, 5 < 5.5 was evaluated as false, but 5.5 > 5 was evaluated as true. Also the result of 5| plus: 5.5 was 10, but the result of 5.5| plus: 5 was 10.5 (now 10.5 is the result of both operations, as expected).
As a potential caveat, note that implicit casting will bring the operands to the relevant type only if one of them is actually of that type. If both operands are of type string, the comparison is made as of between strings. This means that following condition is evaluated as false {% if "3" < "15" %}, because as a string "15" is smaller than "3".
Implicit casting from string to numeric only works if the string represents just a numeric. If the string contains additional characters, like a currency symbol, the conversion will fail. For example, this will not work correctly {% "$15" < 20 %}. Our goal, in the next releases, is to update all modules containing price related tags to have them in plain numeric format.
We added the following filters for easily formatting numeric values representing prices.
number - displays numbers with a fixed number of two decimals using the decimal separator appropriate to the site's culture. For example, in the English US culture, {{ 99| number }} will display 99.00
currency - displays numbers in the same way as number but also inserts the currency symbol at the beginning of the returned value. The currency symbol respects the site's culture. For example, in the English US culture, {{ 99| currency }} will display $99.00
In the next release or releases, we're going to focus on fixing the remaining data types for modules.
CristinelLiam, the server date isn't helpful for converting timezones. We would need a direct date filter. With a filter for UTC and one for the user we should be able to do quite a bit from there.
The most powerful things that could be implemented for date time are the following:
• moment.js and Moment Timezone built into the filters.
• the ability to add time info into date time fields
But I know that's a tall order. -
How can I calling LabView DLL within LabView and pass similar Data Types?
I am trying to use an Instrument Driver, which is created in LabView6.1 as a DLL. At this point I have only LabView to test this DLL. I was wondering, is there easy way to find out what sort of Parameter or Data Type I should be using.
How can I pass the following data with in LabView:
LVRefnum as Type?
LVBoolean as Type?
TD1 (a structure) as Type?
It is funny to see that I am able to create a DLL in labview but having trouble calling it within LabView. I thought, it would be easier to test the DLL within the same environment.
Basically, I am more worried about the VISA calls that are used in the driver to communicate with instrument. Because, there is no link to �VISA32.dll� in
the header file, is that handled by the LV Run-time engine? I guess more details are needed on using the LabView DLL within LabView from National Instrument Technical Support.
Attachments:
RL5000.h 1 KBA LVRefNum seems to be an unsigned long data type (32bit). You can cast it
in LV then use that as a parameter to call the DLL. (an Occurrence type
seems to be a Ulong32)
When you created the DLL what was the resulting type for the LVRefNum?
Happy Holidays
"Enrique" wrote in message
news:[email protected]..
> I see...
>
> After doing some research, it seems to me that there is no easy way to
> find out the type of data, other than looking at the header file and
> have documents like Using External Code in LabVIEW handy. The
> following information is from that document:
>
> LVBoolean is an 8-bit integer. 1 if TRUE, 0 if FALSE.
>
> LabVIEW specifies file refnums using t
he LVRefNum data type, the
> exact structure of which is private to the file manager. To pass
> references to open files into or out of a CIN, convert file refnums to
> file descriptors, and convert file descriptors to file refnums using
> the functions described in Chapter 6, Function Descriptions.
>
> I know you are creating a dll in LabVIEW, but I am pretty sure the
> information applies as well and is useful. For your dll this can be
> interpreted that, rather than passing a LVRefnum, try passing the file
> descriptor.
>
> From the header file, is can be deduced that TD1 is a cluster in
> LabVIEW.
>
> You are right in saying that "more details are needed on using the
> LabView DLL within LabView from National Instrument Technical
> Support.".
>
> Enrique -
Can I modify the data type of a dynamic parameter?
I am using CR2008 against an Oracle 11 db and have a report with dynamic parameters.
One of the report sources is a custom view that selects all of the possible 'pay ending dates' where one of the fields from this view is used as the source for the dynamic parameter.
The view performs a TRUNC on the date field in an effort to eliminate the TIME component.
The problem is that the parameter definintion defaults to DATE/TIME (vs. just DATE). I'm wondering if there is any way to modify the data type of the parameter to be DATE only.
I've searched several forumns but have not found anything.
One solution I can think of is to have the custom view format the date field as a VARCHAR (sans the time component) which I assume would force the dynamic parameter data type to string, and then have the report perform a todate function on the value when applying the criteria.
Anyone else have an idea? Just seems like CR should allow the developer to specify the data type- especially b/w Date and Date/Time, rather than make an assumption.
Thank you in advance-
emaheremaher,
Here's what you can do:
Leave the existing date column as it is in the view...
Just add another column to the view that casts the the date as a VarChar data type and formats the date as you would like it to be.
So now you'll have 2 date columns in the view... 1 that's still a date and another that a character string.
Now for your parameter, use the date version as the parameter value and the text version as the parameter description.
Be sure to set the "Prompt with description only" is set to true.
This way the user sees the LoV in the desired format but there's not need to wrangle it back into a date for data selection.
HTH,
Jason -
I would like to read in and write physiological data files which were saved by BioPac�s AcqKnowledge 3.8.1 software, in conjunction with their MP150 acquisition system. To start with, I�d like to write a converter from different physiodata file format into the AcqKnowledge binary file format for version 3.5 � 3.7 (including 3.7.3). It will allow us to read different file format into an analysis package which can only read in file written by AcqKnowledge version 3.5 � 3.7 (including 3.7.3).
I attempted to write a reader following the Application Note AS156 entitled �AcqKnowledge File Format for PC with Windows� (see http://biopac.com/AppNotes/ app156Fi
leFormat/FileFormat.htm ). Note the link for the Mac File format is very instructive too - it is presented in a different style and might make sense to some people with C library like look (http://biopac.com/AppNotes/ app155macffmt/macff.htm).
I guess the problem I had was that I could not manage to read all the different byte data stream with File.vi. This is easy in C but I did not get very far in LabView 7.0. Also, I was a little unsure which LabView data types correspond to int, char , short, long, double, byte, RGB and Rect. And, since it is for PC I am also assuming the data to be written as �little endian� integer, and thus I also used byte swap vi.
Two samples *.acq binary files are attach to this post to the list. Demo.acq is for version 3.7-3.7.2, while SCR_EKGtest1b.acq was recorded and saved with AcqKnowledge 3.8.1, which version number is 41.
I would be grateful if you someone could explain how to handle such binary file stream with LabView and send an example to i
llustrate it.
Many thanks in advance for your help.
Donat-Pierre
Attachments:
Demo.acq 248 KB
SCR_EKG_test1b.acq 97 KBThe reading of double is also straight forward : just use a dble float wired to the type cast node, after inverting the string (indian conversion).
See the attached example.
The measure of skin thickness is based on OCT (optical coherent tomography = interferometry) : an optical fiber system send and received light emitted to/back from the skin at a few centimeter distance. A profile of skin structure is then computed from the optical signal.
CC
Chilly Charly (aka CC)
E-List Master - Kudos glutton - Press the yellow button on the left...
Attachments:
Read_AK_time_info.vi.zip 9 KB
Maybe you are looking for
-
Hi -- I can turn on my Palm Z22, I can reset it, i can use the buttons, but the touch screen doesn't work at all. Does anyone know a fix for this? Thanks, Betsy Post relates to: Palm Z22
-
SSL - Installing Third party secure certificates
Hi, I am having problem while importing third party secured certificates (Verisign). In STRUST, after import It was still saying Self-Signed message for third party certificates. I am not sure weather this is correct behavior or not. After launch bro
-
Broken iMac Screen; How To Attach External Monitor?
I have an intel 17" iMac and the screen is broken. How can I attach and use just the external monitor as the main monitor? Thanks.
-
Hello Everyone, I am facing an issue when loading the PCR forms. Upon selecting and employee and clicking on 'Select Form', I am getting the following error: The following ABAP Exception occurred: INTERNAL_ERROR: com.sap.tc.webdynpro.modelimpl.dynami
-
ITunes 11.0.1 music hiccups
Hi everyone, I just downloaded and reinstalled iTunes 11.0.1 due to music hiccupping. Now I tried uninstalling everything including iTunes, Bonjour, Appl Application Support, Quicktime, Apple Support and etc. and it still makes my music hiccup. Is th