Writing C programs for Labview RT
I am conducting research on automated manufacturing processes. We have
an 8186 controller that is controlling our machine. The professor I am
doing research with and myself prefer to write programs in c or c++. We
would like to retain the real-time aspect of the Labview RT OS. We use
version 7.1. Is there a way we can have that os run a program we have
written in C? If so how would we do this.
Thanks
Though I have not had to do this yet, I've been told that you can get dlls certified by NI to run in the RTOS.
But even doing this you'll still have to write LabVIEW VIs to call the dlls.
Remember, you're dealing with LabVIEW Real Time. It is designed to
programmed from LabVIEW. There are other Real Time operating systems
you can get that are targeted from C/C++. You might want to look into
those.
Ed
Ed Dickens - Certified LabVIEW Architect - DISTek Integration, Inc. - NI Certified Alliance Partner
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Similar Messages
-
Need help writing host program using LabView.
Need help writing host program using LabView.
Hello,
I'm designing a HID device, and I want to write a host program using National Instrument's LabView. NI doesn't have any software support for USB, so I'm trying to write a few C dll files and link them to Call Library Functions. NI has some documentation on how to do this, but it's not exactly easy reading.
I've written a few C console programs (running Win 2K) using the PC host software example for a HID device from John Hyde's book "USB by design", and they run ok. From Hyde's example program, I've written a few functions that use a few API functions each. This makes the main program more streamlined. The functions are; GetHIDPath, OpenHID, GetHIDInfo, Writ
eHID, ReadHIC, and CloseHID. As I mentioned, my main program runs well with these functions.
My strategy is to make dll files from these functions and load them into LabView Call Library Functions. However, I'm having a number of subtle problems in trying to do this. The big problem I'm having now are build errors when I try to build to a dll.
I'm writing this post for a few reasons. First, I'm wondering if there are any LabView programmers who have already written USB HID host programs, and if they could give me some advice. Or, I would be grateful if a LabView or Visual C programmer could help me work out the programming problems that I'm having with my current program. If I get this LabView program working I would be happy to share it. I'm also wondering if there might already be any USB IHD LabView that I could download.
Any help would be appreciated.
Regards, George
George Dorian
Sutter Instruments
51 Digital DR.
Novato, CA 94949
USA
[email protected]
m
(415) 883-0128
FAX (415) 883-0572George may not answer you. He hasn't been online here for almost eight years.
Jim
You're entirely bonkers. But I'll tell you a secret. All the best people are. ~ Alice -
Is there an existing balance and vibration monitor program for LabView for rotating machinery?
I want to test generators for ballance and vibration, and shaft critical frequency. The data is to be collected automatically and reports generated preferably with LabView. Can I buy a written program as a starting point? I know of the Sound and Vibration Toolkit, and am willing to buy it, but still prefer to start with a verified package. Currently we are using a Bently-Nevada standalone system that is limited in its capability. We are installing a new data collection system so have a lot of flexability.
Good Morning,
Yes, we can put together a written program for collecting balance and vibration data for generators. There is a new tool to be announced April 30th, that goes beyond the sound and vibration toolset for machinery monitoring. We can use LabVIEW and our Dynamic Signal Acquisition hardware to capture accelerometer data, encoder/keyphasor data, and other rotational parameters. We can provide an off-line analysis set of software as well, or report the data to any existing Computer Machine Maintenance Software (CMMS) you need us to work with.
I'd be happy to discuss this with you further.
Sincerely,
Preston Johnson
Business Development Manager
Industrial Applications
National Instruments
512-683-5444
[email protected]
Preston Johnson
Principal Sales Engineer
Condition Monitoring Systems
Vibration Analyst III - www.vibinst.org, www.mobiusinstitute.com
National Instruments
[email protected]
www.ni.com/mcm
www.ni.com/soundandvibration
www.ni.com/biganalogdata
512-683-5444 -
Drivers for over the air programming for labview in wireless sensor network
Hi all ,
In my earlier post, I had requested for information regarding the drivers for Wireless sensor network( WSN) in Labview. I was successfully able to configure my WSN using Labview. thanks to all for the support and help.
However I have a new querry now. I have developed a WSN testbed with more than 1 mote and more than 1 sensor. all the motes are spread out and they communicate with the base mote. the base mote is connected to the gateway and the gateway is connected to the PC where labview and moteview are installed.
Now I need to confure the motes ( ie load a software on the mote which is not connected to the PC) . Is it possible with labview ?
I mean does labview support this kind of a structure .? Say for ex i have a mote with id = 10 and that mote is one hope away from the base mote ? can i still configure that mote remotely ?
thanks!Hey anilhk,
When you say "load the software on the mote" do you mean actually reflashing the firmware on the sensor? If so, there is currently no functionality for this in the Crossbow driver. LabVIEW is certainly capable of doing this, but in order to get the functionality, you may have to program it yourself. The Crossbow driver source code is available to view and using the programming documentation from Crossbow you could make modifications to the driver for your own use.
Regards,
Chris Delvizis
National Instruments -
How to write print program for smartforms
Hi all
I need to develop new smartform and its print program.
But Im not experience in writing print program for smartform.
Ive gone through the simple print program sample that use only one table as input and one table for output.
But my smartforms require few tables for input and output.
How should I define the Data?
Can anyone guide me on how to write it.
Thanks & Regards
azTransaction code SMARTFORMS
Create new smartforms call ZSMART
2. Define looping process for internal table
Pages and windows
First Page -> Header Window (Cursor at First Page then click Edit -> Node -> Create)
Here, you can specify your title and page numbering
&SFSY-PAGE& (Page 1) of &SFSY-FORMPAGES(Z4.0)& (Total Page)
Main windows -> TABLE -> DATA
In the Loop section, tick Internal table and fill in
ITAB1 (table in ABAP SMARTFORM calling function) INTO ITAB2
3. Define table in smartforms
Global settings :
Form interface
Variable name Type assignment Reference type
ITAB1 TYPE Table Structure
Global definitions
Variable name Type assignment Reference type
ITAB2 TYPE Table Structure
4. To display the data in the form
Make used of the Table Painter and declare the Line Type in Tabstrips Table
e.g. HD_GEN for printing header details,
IT_GEN for printing data details.
You have to specify the Line Type in your Text elements in the Tabstrips Output options.
Tick the New Line and specify the Line Type for outputting the data.
Declare your output fields in Text elements
Tabstrips - Output Options
For different fonts use this Style : IDWTCERTSTYLE
For Quantity or Amout you can used this variable &GS_ITAB-AMOUNT(12.2)&
5. Calling SMARTFORMS from your ABAP program
REPORT ZSMARTFORM.
Calling SMARTFORMS from your ABAP program.
Collecting all the table data in your program, and pass once to SMARTFORMS
SMARTFORMS
Declare your table type in :-
Global Settings -> Form Interface
Global Definintions -> Global Data
Main Window -> Table -> DATA
Written by : SAP Hints and Tips on Configuration and ABAP/4 Programming
http://sapr3.tripod.com
TABLES: MKPF.
DATA: FM_NAME TYPE RS38L_FNAM.
DATA: BEGIN OF INT_MKPF OCCURS 0.
INCLUDE STRUCTURE MKPF.
DATA: END OF INT_MKPF.
SELECT-OPTIONS S_MBLNR FOR MKPF-MBLNR MEMORY ID 001.
SELECT * FROM MKPF WHERE MBLNR IN S_MBLNR.
MOVE-CORRESPONDING MKPF TO INT_MKPF.
APPEND INT_MKPF.
ENDSELECT.
At the end of your program.
Passing data to SMARTFORMS
call function 'SSF_FUNCTION_MODULE_NAME'
exporting
formname = 'ZSMARTFORM'
VARIANT = ' '
DIRECT_CALL = ' '
IMPORTING
FM_NAME = FM_NAME
EXCEPTIONS
NO_FORM = 1
NO_FUNCTION_MODULE = 2
OTHERS = 3.
if sy-subrc 0.
WRITE: / 'ERROR 1'.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
endif.
call function FM_NAME
EXPORTING
ARCHIVE_INDEX =
ARCHIVE_INDEX_TAB =
ARCHIVE_PARAMETERS =
CONTROL_PARAMETERS =
MAIL_APPL_OBJ =
MAIL_RECIPIENT =
MAIL_SENDER =
OUTPUT_OPTIONS =
USER_SETTINGS = 'X'
IMPORTING
DOCUMENT_OUTPUT_INFO =
JOB_OUTPUT_INFO =
JOB_OUTPUT_OPTIONS =
TABLES
GS_MKPF = INT_MKPF
EXCEPTIONS
FORMATTING_ERROR = 1
INTERNAL_ERROR = 2
SEND_ERROR = 3
USER_CANCELED = 4
OTHERS = 5.
if sy-subrc 0.
MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
Reward points... -
Hi Everyone,
I am really very new to Labview and i am in great need for some help.I am assigned a task where i am supposed to create a labview program to control or moniter a BPC203 3 channel benchtop Piezo controller. I created a program with the help of the instructions provided in the APT-Labview guide provided by Thorlabs.But th program doesnt run . Whenever i try to run it i get the same error which says that "Control HW Communications disabled".I have attached a snapshot of the error message.So i tried to create a small program in labview which would read the volage output.Even there i got the same error message.I suppose there is some mistake on my part which i am not able to correct due to the lack of proper knowledge.Could anyone please help me to solve this problem.A slight elaboration would be highly appreciated.Also i think the error lies in the use of invoke node with the get Voltage output method. I am not sure whether the parameters i have provided to the invoke node are correct.Any help of any sort would be highly appreciated.
Attachments:
Front Panel with error message.PNG 202 KB
Block diagram.PNG 101 KBHi
I had the same problem today. However, I noticed that the piezo controller has 3 channels with separate slots and they are packaged in the same box. Therefore the whole box has a serial number, probably something like 71822280, and this is written with large letter. Now, in order to communicate with any of the channels, this does not help, but one needs to communicate directly with the interested channel and they have thier OWN SERIAL NUMBERS.
For example channel 1 (my X direction in the nanoMax stage) has serial 91822281, Y has 91822282 and Z has 91822283. So try looking if you have the right serial number Hopefully you found out this yourself but this might help others, I took me3 hours to get this thing working when I started to plug-in the cables and everything.
Lasse -
How do I make a labVIEW program for a linear CCD camera?
Hi, I'm pretty new at LabVIEW and I'm having a hard time figuring out how to connect my linear CCD image sensor (Toshiba TCD1304AP) with my computer. I know I need a DAQ device, what would work best for this particular CCD? After I got that connected, I need to create a LabVIEW program that displays the light detected by my CCD. Does anyone have a similar program or template I can use as a model? Any help would be appreciated. Thanks.
Hello,
I'm not sure the type of signal that is generated as an input to a DAQ device. This could either be an analog or digital input. The signal type will determine how you make your program in LabVIEW. You will also need to correlate the signal level to the light detected. That will be determined by your sensor. I don't have any programs or templates for this, but if you look at the basic analog or digital input examples, you might get a good starting point for DAQ device programming.
-Zach
Certified LabVIEW Developer -
Need help for writing extract program
hi
i need help for writing extract program to retriew data from legacy system.
i already developed bdc programs for me31k and me21.
my requirement is to write extract program s for those t.codes.
to retriew data from legacy system and stored in flat file.i need help with a java program. it is a program that allows the user to enter a student's GPA, number of extracurricular activities, and number of service activities. The user can not enter a gpa above 4.0 or below 0. The user can not enter a negative number for the number of both activities. If the student meets the following criteria: 1) GPA of 3.8 or above and at least one extracurricular activity and one service activity, 2) GPA below 3.8 but at least 3.4 and a total of at least three extracurricular and service activities, 3) GPA below 3.4 but at least 3.0 and at least two extracurricular activities and three service activities, the message "Scholarship candidate" should display. If the student does not meet the criteria above, then the message"not a candidate" should display. Can you help me, please?
You haven't posted ANY 'java program' for us to help with.
The forum is NOT a coding service. It is to help you with YOUR code.
Post the code you have written and SHOW us (don't just tell us) how you compile it and execute it and the results you get. Then we can help you with any problems you are are having.
If you need help understanding just what the program should be doing you need to ask your instructor to clarify the assignment. -
Writing Programs for Intel Mac?
I am a writer of young adult fiction novels.
I want to get a writing program for my new Intel based iMac.
Should I spend $150 for Microsoft Word and get a bunch of other apps I don't use and won't need?
Or, is there one, online, that is free or inexpensive that will allow me to write my stories and create readable files for other computers as well as PDFs?
Best,
Evan Jacobs
www.anhedeniafilms.comHave you visited < www.puremac.com > ????
They have classified links to finding everything you will need in the way of Macintosh software.
There are SO VERY many companies that make wonderful desktop publishing programs you have never heard of.
Or, better still, go to <www.mause.ca > and download some of the 2007 DoubleClick newsletters: look for reviews of DesktopPublisher Pro, Ready,Set,Go!, QuarkXPress 7, Swift Publisher, MLayout, RagTime & RagTime Solo, Mariner Write, and others. For a while they had a few reviews of excellent desktop publishing articles in every issue.
Check them out !!!!! -
Are there any simple LabVIEW motion program for Newport MM4006 controller
My system consists of a PC with a IEEE488.2 from NI that connects to 2 Newport MM4006 controllers, which, in turn control a high-precision stage.
I would like to know if you can provide me with any simple motion programs in LabVIEW. Since I am starting to learn motion programming, I would like to know if there are any existing LabVIEW VIs that allow easy inputting of the motion commands.
I am having some trouble in ordering each motion segment's commands in LabVIEW environment, so I guess some examples might help me to clarify the correct syntax and logic in LabVIEW. Right now, I am using mostly the SendCommand sub VI in the MM4006 package downloaded from National Instruments to issue the seque
nce of the commands that are supposed to be executed one after the other in order to perform a specific path. Do you know if there exists any other bette way of issuing a long sequence of the motion
commands?
Alos, can FlexMotion be used for my system? What are the requirement for usign FlexMotion in LabVIEW. Is it the best way to program a motion VI for my system?The FlexMotion VIs can only be used with our FlexMotion controllers, not GPIB devices. For your Newport controllers, the best thing to use is the instrument driver that you downloaded off of our website. This code was contributed to our website so we don't have any example programs to go with it. I looked on Newport's website and they mentioned that they had sample code for this controller. You might want to contact them and see what they have.
Jack Arnold
Application Engineer
National Instruments -
Hi all,
I am developing a labview program for a high
power microwave device. The final program will
be running stand alone on a pc attached to the
microwave device in a laboratory. To ensure
safety, I am wondering if I can set up a password
to the labview program at start up so only
authorised people can use it? Or if there is
other way to do that. Any comment will be
greatly appreciated.
Thanks.
Regards
Hank
Sent via Deja.com
http://www.deja.com/In article <[email protected]>,
[email protected] wrote:
> Hi all,
>
> I am developing a labview program for a high
> power microwave device. The final program will
> be running stand alone on a pc attached to the
> microwave device in a laboratory. To ensure
> safety, I am wondering if I can set up a password
> to the labview program at start up so only
> authorised people can use it? Or if there is
> other way to do that. Any comment will be
> greatly appreciated.
>
> Thanks.
>
> Regards
>
> Hank
>
> Sent via Deja.com
> http://www.deja.com/
I am pretty sure that you can do that by using a case loop outside of
your main program. You can set it up so that user(s) will have to
enter a string (which would be password) before he/she can get to the
front panel of the main program.
Within this vi, you can have an array of strings such that users can be
given different passwords (or level of authority) for more security.
After the user enters the password, you can compare the user input by
using equal function in the comparison palette (make sure the password
list is case sensitive or stuff like that or you'll have to convert all
the user input string to either upper or lower case if you want to save
some trouble). If the result of comparison is true, then they can get
into the main program, or else the program will quit.
You can also put in looping structure to make it more fancy such that
each user can be given say 3 chances to enter the correct password...
If you want to go really fancy, you could also try to put in a data
file that stores all the passwords in binary format (requires a little
conversion, of course) in a directory of the target machine that you
know exist (say WINDOWS or WINNT), and include the data file as part of
your instalation disk content, point the installation destination to
that directory. In your password program, find the target machine
operating system and then look for the file from there.
Hope it helps. If you have any questions, please e-mail me at
[email protected], and I'll try to e-mail you a copy of my code.
Sent via Deja.com
http://www.deja.com/ -
How can I write program in Labview for zbrain kit..??
Hello everybody
I need to write the program in Labview fro Zbrain kit. I need to write code for multiple analog input (through multiple channels) that results multiple digital output. I found one refrence code which has one analog input (one channel) and gives one digital output.
I also need to save data for channels. I have no idea how can I save data for channels.
I have attached here the base program. Please give me idea how can I understand this program so that I can complete following tasks:
1. Save data for one channel and later for multiple channels
2. Modify the number of channels from one channels to multiple channels.
Actually I have gone through the videos and text based content(basics in labview) but I am unable to write the code.
Attachments:
Analog_3_InBlock.vi 131 KBHi,
Attached is an example snipped with some more comments on how to acquire multiple channels on a ZBrain platform that is based on an Analog Devices Blackfin processor. Just drag and drop it into your LabVIEW diagram. More examples can be found here: http://wiki.schmid-engineering.ch/zsystem/doku.php?id=example_zmc_adc-dma_continous. The idea behind dynamic data acquisition on a microprocessor is simple: you define the channels (up to 6x) , sampling frequency (up to 250kHz) and block sizes (up to 65'000) and start the acquisition. The underlying driver model samples in the data in parallel and the LabVIEW program gets this data. While e.g. processing the data, the underlying driver model continues sampling new data.
I hope this helped.
Marco Schmid
Schmid Engineering
Attachments:
snippet_zmc_adc-dma_continuous.png 107 KB -
The labview 7.1 can programing for fpga?
The labview 7.1 can programing for fpga our I need buy the labview 8 fpga?
How much the software labview 8 and the fpga targets?Hi RN,
LabVIEW 7.1 can be used with LabVIEW FPGA 1.1. LabVIEW 8 (the version currently sold) works with LabVIEW FPGA 8.0, which you can find more information on at http://www.ni.com/fpga/ . There are several options for FPGA targets, and you can find information on these at http://www.ni.com/fpga/hardware_targets.htm .
Best regards,
David H.
Systems Engineer
National Instruments -
Look for LabVIEW part time programming
Hi,
I am available for part time LabVIEW programming. Areaingapore.
Certified LabVIEW Developer.
Currently resides at Spore. Look for LabVIEW project.
Please email me at [email protected]
BR,
Bug Killeryou can visit my website: www.bjcyck.com
-
LabVIEW programing for 32 bit micro controllers
I have been programing with LabVIEW for about a year now and found out there is a way to use LabVIEW to write code for micro processers. Did some searches and found out there is a more set up and 3rd party interface is required.
Is there a document, web cast or training of some kind that would walk through the set up?Are you talking about the C generator? Have you checked the price? It is crazy expensive -- I looked into it once and it was thousands of dollars per year...
Mike...
Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion
"... after all, He's not a tame lion..."
Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps
Maybe you are looking for
-
I lost all my ipod songs when my mom plugged her exact same ipod (5th generation nano) into my computer. She did not get my songs on hers but somehow I lost mine. I tried the five R's and evrything I could find online. I cannot get the songs from my
-
Anyone successfully imported MYOB data to SAP B1?
Hi, Does anyone successfully imported/migrated an MYOB data into SAP B1? What actually the necessary steps prior to importing legacy data into SAP B1 after creating the Company Database? After successfully created a company data file in SAP B1, can I
-
Problems with third party package and file access
I am using a third party package that allows me to decode multipart forms that I use to upload files to our server. I have been able to write my own code (JSP) that both reads and writes to our filesystem. However, when I try to upload a file using t
-
Hello, I have seen that we can manually flush the RESULT_CACHE with DBMS_RESULT_CACHE.FLUSH; If the RESULT_CACHE is full and we don't flush it, what will it happen if we try to cache the result of a new query ?
-
Planed costs on Simulation Version
Where can I see the planed costs on Simulation? I have an escenario where the project is created as Simulation, and after this one is evaluated on duration and costs, the user transfer the simulation to an operative project, but I need to see the pla