Have anyone used Labview to call MSP430_Memory function in the MSP430.dll?
Hi,
I am trying to read data from Infromation Memory of a MSP430 MCU. I am using MPS-FET430UIF to communicate with the MCU and having trouble to get data using the function MSP430_Memory. Have anyone done this before? I greatly appreciate any help from this forum.
Good Afternoon,
I just have a couple of quick questions for you:
How are you going about calling the dll in LabVIEW?
Are you using the call library function node?
Could you post your code so we can take a look at it and get a better idea how you are going about it?
I hope you have a great rest of the day!
-Cody C
Similar Messages
-
How to implement a callback function using LabView's Call Library Function Node?
I am trying to call a fuction from a SDK.dll library using the Call Library Function Node. The SDK was provided to
me and I do not have the source code, just the .dll and .h files.
The SdkSetPropertyEventHandler function has a callback fuction as one of its parameters. How do I implement the
callback using the CLF node? I am a good LabView programmer but this is my first time using the Call Library
Function Node. I have read all the info I can find on NI's web site and the discussion board but cannot figure
this one out. I am using LabView 8.6.
The SDK.h deacribes the function as:
// Function: SdkSetPropertyEventHandler
SdkError SDKAPI SdkSetPropertyEventHandler(
SdkCameraRef inCameraRef,
SdkPropertyEvent inEvnet,
SdkPropertyEventHandler inPropertyEventHandler,
SdkVoid* inContext );
// Description:
// Registers a callback function for receiving status
// change notification events for property states on a camera.
// Parameters:
// In: inCameraRef - Designate the camera object.
// inEvent - Designate one or all events to be supplemented.
// inPropertyEventHandler - Designate the pointer to the callback
// function for receiving property-related camera events.
// inContext - Designate application information to be passed by
// means of the callback function. Any data needed for
// your application can be passed.
// Out: None
// Returns: Any of the sdk errors.
A separate header file called SDKTypes.h contains the following data:
typedef SdkUInt32 SdkPropertyEvent;
typedef SdkUInt32 SdkPropertyID;
typedef void SdkVoid;
typedef struct __SdkObject* SdkBaseRef;
typedef SdkBaseRef SdkCameraRef;
SdkPropertyEventHandler
typedef SdkError ( SDKCALLBACK *SdkPropertyEventHandler )(
SdkPropertyEvent inEvent,
SdkPropertyID inPropertyID,
SdkUInt32 inParam,
SdkVoid * inContext );
Thanks for your help.
Alejandro
Solved!
Go to Solution.alejandroandreatta wrote:
I am trying to call a fuction from a SDK.dll library using the Call Library Function Node. The SDK was provided to
me and I do not have the source code, just the .dll and .h files.
The SdkSetPropertyEventHandler function has a callback fuction as one of its parameters. How do I implement the
callback using the CLF node? I am a good LabView programmer but this is my first time using the Call Library
Function Node. I have read all the info I can find on NI's web site and the discussion board but cannot figure
this one out. I am using LabView 8.6.
Basically you do not do that. LabVIEW does not know pointers and certainly not function pointers. What you should do instead is writing a C DLL that implements the callback and also exports a function to be called by LabVIEW that translates between the callback and a LabVIEW user event. Look for PostLVUserEvent() here on the NI site to find examples how to do that.
Rolf Kalbermatter
Message Edited by rolfk on 02-11-2009 08:00 PM
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
Hello,
I have been working for a couple of weeks on writing a DLL in Visual C++ Studio. My intention is to write an exported function in the DLL to initialize a Logitech Force3Dpro joystick, setup a force feedback effect and run it using DirectInput. I would like to control this force feedback effect (in particular, the intensity of the feedback) from Labview by calling the function in the DLL.
I followed the FFConst example in Microsoft SDK DirectInput Samples for making an .exe file to setup and run force feedback effects. I have been able to build the DLL successfully with an exported function that can be accessed from Labview by "Call a function node". I tested the function by running simple functions such as addition and multiplication of integers, andconfirmed the fact that the DLL was built correctly. I have also included the DirectInput code for initializing and running the force feedback effect. I am able to compile and build the DLL with no problems.
The Problem:
The only problem that I have at this point is with setting SetCooperativeLevel for the DirectInput8 joystick device. I have to provide a top-level window handle to SetCooperativeLevel so that I can give the function exclusive access to the joystick. Since I am not making a window and am building a DLL, I am not sure what handle I am supposed to provide it so that the joystick can respond. I am not sure if passing a handle to the Labview window would work because it is accessing the DLL's function? I tried passing LabView window handle to the function and read the X-axisposition off the joystick, but it read some junk (huge long integer) - which lead me to believe that the problem is something to do with initializing the joystick.
For all practical purposes, I am a complete novice at DirectInput
programming and working with Visual C++. Although, I have programmed in
C++previously. I am sorry for the long message, but I wanted to give a bit of background so that my aim is clear.
Any help, advice or direction with this problem be very much appreciated. Thank you for your time!
Cheers!
AbhishekHi,
This gave me the nudge in the right direction I needed, after a bit of basic frameset research I've got the desired functionality.
Huge thanks! -
Do I have to use LabVIEW Real Time with a reflective memory node?
For reference with an external data system that will be temporarily installed at a customer's site, they have asked that I tie into their data network to record data from their control system. They apparently use a reflective memory network for data sharing. I have no prior experience with reflective memory, but all references to it involve real time systems. I do not need absolute determinism to acquire this data, I can be late by several milliseconds with no problem. Do I still need to use LabVIEW Real Time to interface with the PXI reflective memory node?
Hi AEI,
I have worked with that card briefly before. It has a Visa based driver and RT isn't required. However, I haven't worked with the card on a non-rt system and am not sure if there any issues to be aware of.
A lot of work has gone into integrating support for the card into Veristand, it may save you enough development time to use at an RT-Veristand system to be worth the extra cost.
Jesse Dennis
Design Engineer
Erdos Miller -
I have been using iphone 5. Whenever I open the Game Center, The green screen of accounts comes up and it get stuck. Nothing happens after that. If anyone can help me please.
Refer to this article to delete SC files:
iTunes for Windows in Windows XP or Windows 2000 doesn't open after upgrading
http://support.apple.com/kb/TS1776
Then proceed to repair your QuickTime on Control Panel>Add n Remove Programs >highlight QuickTime, click CHANGE button, then REPAIR. -
Have anyone used IDOCs for FB01 posting ?
Have anyone used IDOCs for FB01 posting with posting keys ? If so please help me with the code.
I am using posting keys 15 for the first line item to Customer account(Credit) and posting keys 40 for the second line item (Debit)DID you find in which User exit you are going to Code? Then we can ref old posts.
then you will get the code. not same belongs to FB01, for othre
Regards,
anjireddi -
Calling a Function in the Parent Window from the Child Window
QUESTION: How do I call a function resident in the parent
window from a child window?
BACKGROUND
I have a JavaScript function resident in the parent window
that reformats information obtained from the Date object and writes
the result to the parent window using the document.write( ) method.
I would like to call this function from the child window and have
it write to the child window instead. Is this possible? If not,
must I rewrite the entire function and nest it in the below code?
If so, what is the proper form of nesting?
CODE: The code that creates and fills the child window is
provided below. The highlighted area indicates where I would like
to enter the information from the function resident in the parent
window. I have tried every imaginable permutation of code that I
can imagine and nearly destroyed my parent document in the process.
I am very happy that I had a back-up copy!
function openCitationWindow() {
ciDow = window.open("", "", "width=450, height=175, top=300,
left=300");
ciDow.document.write("A proper way to cite a passage of text
on this page:<br /><br />Stegemann, R. A. 2000.
<cite>Imagine: Bridging a Historical Gap</cite>. " +
document.title + ". [<a href='" + location.href + "'
target='_blank'>online book</a>] <" + location.href
+ "> (");
MISSING CODE;
ciDow.document.write(").<br /><br /><input
type='button' value='Close Window' onclick='window.close()'>");
ciDow.focus();Never mind - I was doing something very stupid and wasn't
calling the function as a method of a movie clip. I was simply
calling checkTarget(event) rather than
event.currentTarget.checkTarget(event); which seems to work. -
ODI Error - Calling a function in the source database
I am using this directly in the Interface mapping and getting the following error
This is the syntax I am using SUM(CASE WHEN ((main.getCertDate(person_id,getdate()) >= current_timestamp) THEN 1 ELSE 0 END)
ODI-1228: Task Load_Fact_Table1 (Integration) fails on the target MICROSOFT_SQL_SERVER connection SQLSERVER_USA.
Caused By: java.sql.SQLException: [FMWGEN][SQLServer JDBC Driver][SQLServer]Cannot find either column "main" or the user-defined function or aggregate "main.dbo.getCertDate", or the name is ambiguous.
Am I missing any additional steps, before calling a function in the mapping. Do I have to do something in the model to include teh function etc., Please help in fixing this issue.
Thanks for your time and help.Hi Michael, Please see below.
IKM - MSSQL Incremental Update
Failing on Step 3 - Integration - Insert flow into I$ table
insert into db11.dbo.##I$_FCT_TABLE
COMP_ID,
CNT_CLP_TARGET_MET,
CNT_CERTIFIED,
CNT_NOTCERT_WITHIN_GRACE_PRD,
CNT_CERT_OR_WITHIN_GRACE_PRD,
CNT_CERT_DELINQUENT,
SUM_OF_AGE,
SUM_OF_YEARS_EXPERIENCE,
LOAD_DATE,
IND_UPDATE
select
CASE WHEN DIM_COMP.COMP_ID IS null then -9999
ELSE DIM_COMP.COMP_ID
END,
SUM(CASE WHEN ((main.dbo.getCertDate ([DISTINCT_RWF.MASTERKEY],GETDATE()) >= CURRENT_TIMESTAMP) OR DISTINCT_RWF = 'NO') THEN 1 ELSE 0 END),
CURRENT_TIMESTAMP,
'I' IND_UPDATE
from ((
select DISTINCT
REPORT_WORKFORCE_REVIEW.REGION as REGION, REPORT_WORKFORCE_REVIEW.COMPO as COMPO, REPORT_WORKFORCE_REVIEW.PERSON_ID as PERSON_ID, REPORT_WORKFORCE_REVIEW.WF_STATUS as WF_STATUS, REPORT_WORKFORCE_REVIEW.PERSON_NAME as PERSON_NAME, REPORT_WORKFORCE_REVIEW.CPCN_NUM as CPCN_NUM, REPORT_WORKFORCE_REVIEW.COMMAND as COMMAND, REPORT_WORKFORCE_REVIEW.UIC as UIC, REPORT_WORKFORCE_REVIEW.UIC_STATE as UIC_STATE, REPORT_WORKFORCE_REVIEW.ORG_STRUCTURE_CODE as ORG_STRUCTURE_CODE, REPORT_WORKFORCE_REVIEW.ORG_DESC as ORG_DESC, REPORT_WORKFORCE_REVIEW.LOCATION as LOCATION, REPORT_WORKFORCE_REVIEW.STATE as STATE, REPORT_WORKFORCE_REVIEW.SVC_COMP_DATE as SVC_COMP_DATE, REPORT_WORKFORCE_REVIEW.YRS_OF_SERVICE as YRS_OF_SERVICE, REPORT_WORKFORCE_REVIEW.POSITION_ENTER_DATE as POSITION_ENTER_DATE, REPORT_WORKFORCE_REVIEW.MTHS_EXP_IN_PRESENT_POS as MTHS_EXP_IN_PRESENT_POS, REPORT_WORKFORCE_REVIEW.MTHS_EXP_IN_CURRENT_APC_ACL as MTHS_EXP_IN_CURRENT_APC_ACL, REPORT_WORKFORCE_REVIEW.AGE as AGE, REPORT_WORKFORCE_REVIEW.SEX as SEX, REPORT_WORKFORCE_REVIEW.SUPV_CODE as SUPV_CODE, REPORT_WORKFORCE_REVIEW.ACF as ACF, REPORT_WORKFORCE_REVIEW.CP as CP, REPORT_WORKFORCE_REVIEW.SERIES as SERIES, REPORT_WORKFORCE_REVIEW.DUTY_TITLE as DUTY_TITLE, REPORT_WORKFORCE_REVIEW.APT as APT, REPORT_WORKFORCE_REVIEW.APT_DESC as APT_DESC, REPORT_WORKFORCE_REVIEW.API as API, REPORT_WORKFORCE_REVIEW.SAA as SAA, REPORT_WORKFORCE_REVIEW.GRADE as GRADE, REPORT_WORKFORCE_REVIEW.HI_DEGREE as HI_DEGREE, REPORT_WORKFORCE_REVIEW.LVL_DESC as LVL_DESC, REPORT_WORKFORCE_REVIEW.APC as APC, REPORT_WORKFORCE_REVIEW.ACL as ACL, REPORT_WORKFORCE_REVIEW.CERT_LVL_ACHIEVED_IN_APC as CERT_LVL_ACHIEVED_IN_APC, REPORT_WORKFORCE_REVIEW.CERT_IN_POSITION as CERT_IN_POSITION, REPORT_WORKFORCE_REVIEW.CERT_BELOW_POSITION as CERT_BELOW_POSITION, REPORT_WORKFORCE_REVIEW.NOT_CERTIFIED as NOT_CERTIFIED, REPORT_WORKFORCE_REVIEW.CLP as CLP, REPORT_WORKFORCE_REVIEW.LAST_IDP_UPDATE as LAST_IDP_UPDATE, REPORT_WORKFORCE_REVIEW.LAST_IDP_UPDATE_MTHS as LAST_IDP_UPDATE_MTHS, REPORT_WORKFORCE_REVIEW.SUPV_REVIEW_DATE as SUPV_REVIEW_DATE, REPORT_WORKFORCE_REVIEW.SUPV_REVIEW_DATE_MTHS as SUPV_REVIEW_DATE_MTHS, REPORT_WORKFORCE_REVIEW.EMAIL as EMAIL, REPORT_WORKFORCE_REVIEW.MASTERKEY as MASTERKEY
from main.dbo.REPORT_WORKFORCE_REVIEW as REPORT_WORKFORCE_REVIEW
where (1=1)
) as DISTINCT_REPORT_WORKFORCE_REVIEW LEFT JOIN main.dbo.PERSON as PERSON ON DISTINCT_REPORT_WORKFORCE_REVIEW.MASTERKEY=PERSON.MASTERKEY) LEFT JOIN main.dbo.ACQUISITION_CORPS_QUALIFICATION as ACQUISITION_CORPS_QUALIFICATION ON DISTINCT_REPORT_WORKFORCE_REVIEW.MASTERKEY=ACQUISITION_CORPS_QUALIFICATION.MASTERKEY) LEFT JOIN main.dbo.PERSONS_POSITIONS as PERSONS_POSITIONS ON DISTINCT_REPORT_WORKFORCE_REVIEW.PERSON_ID=PERSONS_POSITIONS.MASTERKEY
AND PERSONS_POSITIONS.POSITION_END_DATE IS NULL) INNER JOIN db11.dbo.DIM_COMP as DIM_COMP ON DISTINCT_REPORT_WORKFORCE_REVIEW.COMPO=DIM_COMP.COMP_CODE AND DIM_COMP.CURRENT_RECORD_IND = 1) LEFT JOIN db11.dbo.DIM_POSITION_TYPE as DIM_POSITION_TYPE ON DISTINCT_REPORT_WORKFORCE_REVIEW.APT=DIM_POSITION_TYPE.POSITION_CODE
AND DIM_POSITION_TYPE.CURRENT_RECORD_IND=1) -
Can call a function in the select statement?
Is there any ways to call a function in the select statement?
what I like to do is this:
select deptno, totalEmployees(deptno), TotalSalary(deptno)
from emp;
I know it can be done by count(*) and join tables, but my case
is much more complex and the where clauses are different from
one function to another, and have many tables to join and many
combinations
ThanksFunctions can be used in a select statement subject to certain
restrictions, see
http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/
server.817/a85397/statem9b.htm#2062024
It's under "CREATE FUNCTION> Keywords and Parameters> function>
Restrictions on User-Defined Functions"
Here is an except...
When a function is called from within a query or DML statement,
the function cannot:
a) Have OUT or IN OUT parameters
b) Commit or roll back the current transaction, create or roll
back to a savepoint, or alter the session or the system. DDL
statements implicitly commit the current transaction, so a user-
defined function cannot execute any DDL statements.
c) Write to the database, if the function is being called from a
SELECT statement. However, a function called from a subquery in
a DML statement can write to the database.
d) Write to the same table that is being modified by the
statement from which the function is called, if the function is
called from a DML statement.
Except for the restriction on OUT and IN OUT parameters, Oracle
enforces these restrictions not only for the function called
directly from the SQL statement, but also for any functions that
function calls, and on any functions called from the SQL
statements executed by that function or any function it calls. -
Call a function in the shell SWF from a imported SWF
We have flash set up as a shell to take lesson data from XML
and display it frame by frame.
We import SWF files when the XML tells it to to be displayed
on the frame.
How can I get the imported SWF file to call a function in the
shell....
basically have a button or movie clip in the imported swf
call the "gotoNextFrame()" function in the shell.We found a "bit" easier way if anyone is interested.. we have
the have an eventlistner added to the loader to assign a event to
the swf file thats imported:
flashLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,
addEventHandlers);
then when its completed, it adds event listeners and calls
our "goNextFrame" function (then clears it when its removed from
the stage):
function addEventHandlers(event:Event):void
var swfMC:MovieClip = event.target.content as MovieClip;
swfMC.addEventListener("NextFrame", goNextFrame);
swfMC.addEventListener("PreviousFrame", goPrevFrame);
swfMC.addEventListener(Event.REMOVED_FROM_STAGE,
clearEventListeners);
Then in the swf file thats to be imported, its real simple:
next_btn.addEventListener(MouseEvent.CLICK, MoveToNextFrame);
prev_btn.addEventListener(MouseEvent.CLICK,
MoveToPreviousFrame);
function MoveToNextFrame(e:MouseEvent):void
dispatchEvent(new Event("NextFrame"));
function MoveToPreviousFrame(e:MouseEvent):void
dispatchEvent(new Event("PreviousFrame")); -
Call Java functions in a C DLL
Hi,
I am develop a dynamic link library in C on AIX that will internally call java functions using JNI. This libaray will be finally used by other C Executable.
There is only one function in C code i.e. Connect. This function internally use JNI and call java functions. Now while compiling I am facing problems. I think that there is some problem with my makefile.
The make file is given hereunder:
JAVA_HOME = /usr/java14
JAVA_INC = $(JAVA_HOME)/include
CC = cc
LD = cc
# Flags to create a dynamic library.
DYNLINKFLAGS = -G -ostdlib -bnoentry -bM:SRE -brtl -bE:Interface.exp
# files removal
RM = rm -f
#------------------------------------- Libs -----------------------------------#
JAVALIBS = -L$(JAVA_HOME)/jre/bin/classic/
LIBS = -ljvm -lpthread -lxnet -lnsl -lm -ldl
#-------------------------------- Dependency rules---------------------------#
# shared library files
LIB_FILES = Interface.a
#-------------------------------------OBJs-------------------------------------#
# shared libraries object files
LIB_OBJS = Interface.o
all: $(LIB_FILES)
# create our librarys
Interface.a: Interface.o
$(LD) $(DYNLINKFLAGS) $(JAVALIBS) $(LIBS) $(LIB_OBJS) -o $@
# compile C source files into object files.
%.o: %.c
$(CC) $(DYNLINKFLAGS) -L$(JAVA_INC) -c $<
# clean everything
clean:
$(RM) $(LIB_OBJS) $(LIB_FILES)
# clean the library's object files only
cleanlibobjs:
$(RM) $(LIB_OBJS)Now the problem is that the size of the Interface.a file is very small only 552 bytes. whereas the size of Interface.o file is 34428. Which clearly indicates that the problem is with the Interface.a file i.e during linking.
Can any body help me to figure out the problem.
Regards,
Ahmad Jalil QarshiI guess, you are better off to ask this question in a C forum. This is a Java forum, you know.
-
Calling a function in the main movie from a loaded swf
I realize this is probably a very basic question, but I have
loaded a SWF file into another movie. I now want to call a function
in the main SWF. Is there a way to do that? Alternatively, I have a
custom class where I could put the function, but I haven't been
able to figure out how to call it from the loaded SWF either. Do I
somehow need to associate the class with the main movie,
or...?Never mind - I was doing something very stupid and wasn't
calling the function as a method of a movie clip. I was simply
calling checkTarget(event) rather than
event.currentTarget.checkTarget(event); which seems to work. -
How to use "Set Enterprise Call Info" step in the script ?
Hi all
Can anyone please suggest how to use "Set Enterprise Call Info" step in the script.
Does anyone has any example script with the same (a complete example script) ?Hi
go to this guide
http://www.cisco.com/c/dam/en/us/td/docs/voice_ip_comm/cust_contact/contact_center/crs/express_7_0/user/guide/uccx70edgs.pdf
and see the chapter
"Designing Scripts for use with the Cisco Application Gateway" -
firefox.exe has encountered a problem and needs to close. We are sorry for the inconvenience.
I have been using firefox for years. I installed the latest version of Firefox. It worked fine for several days. Now I get the above message each time I try to start Firefox, even in safe mode. i have checked with latest antivirus softwere also.. i didn't find any thing suspicious.
== This happened ==
Every time Firefox opened
== after loading firefox 3.6.6 ==
== User Agent ==
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.99 Safari/533.4I was having this problem few days ago,and I have fixed.Try this steps-If you have AVG antivirus so go on firefox>Tools>Add On and Disable AVG safe search and AVG tool bars too.Then restart computer.
-
I am attempting to have cells use data from a selective month from the year before so that I can show actual from the prio. year each month. I need to create a spreedsheet using the the Acutlas from the year-to-date and from last year-to-date, but need to report each month.
Hi Tony,
Answering your question would be easier given a screen shot of the source table and one of what you want the summary table to look like.
Is the data you want for each month in a single cell o the source table, or does the summary table need to collect February's data (for example) from several cells and do some math with those numbers before presenting them on the summary table?
Regards,
Barry
Maybe you are looking for
-
ITunes won't sync any music that was not purchased from iTunes onto my iPhones 5S
I have updated to Mavericks on my macbook, and iTunes will no longer sync my iPhone 5S properly. It does not remove any music that has been deleted. My phone will no longer play any music that was not purchased from iTunes. I tried to delete all my m
-
Multiple record insert problem in Oracle Procedure that uses a cursor
Dear X-pert guies, I have a oracle procedure that use a cursor, I repeatedly make query on 1st table using cursor value and insert that queried value(of 1st table) to 2nd table y_summary. y_summary has composite primary key :PK_Y_SUM (BILL_DATE, TRU
-
Certain websites will not load at certain times.
Hi, for the last few weeks, I have been having difficulty with loading certain websites at certain times of the day. The problem is affecting websites that I've been using for years, such as hotmail, Facebook, eBay, BBC Newsfeeds, Lego website, CB
-
How to handle Pre-requistes in AppV?
Hi All, How to handle Pre-requisites in Application Virtualization? I know that we need to install all the pre-requisites in Sequencer Machine before starting sequencer & then the same pre-requisites should be available in Client. I know that we can
-
Hi, I am from Pakistan I need you help kindly plz help me. Here I describe my problem to and hope fully that you shoud try your level best to solve and support to me. I shall very thank full to you in advance. Respected I have"Samsung saga i" m