Options for having cFP write and read file
I have a cFP VI that runs on a cFP 2110 controller for doing process automation on a custom piece of equipment. It seems that each month we use the same equipment for a slightly different automated process routine. What I have done in the past is to make a copy of my VI's and real-time project and then make the changes in the code for the new process. Most of the changes to the code between processes are just changes to numeric controllers to change ramp and slope times or the number of times the code repeats a set of steps. I have been playing around with writing a sort of configurations page to my VI to allow the user to change some numeric controls, save them to a file using the Read Key.VI and Write Key.VI. In the simple tests I have done, this works If I have a target VI on the cFP 2110 and a host VI where I can have the configurations page and save the file to my computer's hard drive.
The configurations file I would create would probably have 15-30 numeric controls and maybe some string commands. I have a couple of questions about doing this. Do I need to go back and create both Target and Host VI and communicate between the two using shared variables, or can I just keep my current VI and write a subVI that would save my files to the cFP controller? If I save the files to the cFP controller, can user set the numeric controller and save the file and/or likewise call-up any of say one of say 10 differnet files to populate the various sub-VI and run?
Finally, provided that I can write and read these small configuration numeric controller files to the controller, is there any advantage to writing the files to one method or the other: writing to the controller vs, creating a target and host VI to load the data?
Thank you for the help.
Danny
Attachments:
Test read write key.vi 58 KB
StepanieO,
I finally had a change to play around with the cFP file write and read again. I was able to write a the cFP and read the file back using write to spreadsheet and read from spreadsheet. The one problem I can't seem to figure out is how you browse the cFP to select a file. If I enter the file name and path into the string command it works. But If I try to browse the cFP, the browse button only shows the computer hard drives. Is there a way to browse the cFP controller for a specific file?
Thank you for the help.
Danny
Danny
Attachments:
Write to spreadsheet.vi 18 KB
Similar Messages
-
How to combine both DAQ AI signal, write and read file in single VI
Hi
I am the new user of LabVIEW version 7.1 for testing automation application. I have to measure 33 signals ( mostly analog like temp, pressure, etc...) from NI USB 6210 DAQ system and write in master file for future verfication.From real data or from master file back up have to write one more file if only the signal reaches steady state , which will used for analysis and same signals to be read from this file parallely & make a waveform and/or table display format.
Pl. help me to shortout this problem
note: I have plan to ugrade labVIEW version 2011 shortly, so let me know doing parrel acquistion write and read file for data analysis in same VI in version 7.1......Parallel operations in LabVIEW are very simple. Just code it in parallel and it will work.
Try taking a look at some of the examples in the NI Example Finder (Help > Find Examples). There you will find example for writing to and reading from files, as well as data acquistion in parallel with other operations.
You might need a producer/consumer architecture is you are acquiring data very quickly.
Chris
Certified LabVIEW Architect
Certified TestStand Architect -
Closing a serial port after executing a for loop of write and reads.
Hello,
Labview is opening and then closing each write to the port. I have tried to leave the close outside of the for loop, but labview wont allow it. What do I need to change to make all the writes and reads execute on 1 open and close of the serial port.?
Thanks.
Attachments:
Controller.vi 27 KBJ_es--
The program that you posted looks to be ok for the most part, you might consider putting an open after your configure (but that's trivial). The other thing that is a minor issue is the loop tunnel coming out of your for loop is currently being auto-indexed. This function is used to index data for each interation of the loop. You are using a static address (not an array) and so you don't need this. If you right-click and remove the auto-index the broken wire will go away. Other than that it should be ok.
I would suggest looking at one of the shipping examples that come with LabVIEW. "Basic Serial Read and Write" is essentially the same thing that you are doing and is tested here and might save you a bit of time. Anyway, take a look if you have a second. Best of luck with your application!
John H.
Applications Engineer
National Instruments
http://www.ni.com/support -
Viable options for having just Photoshop and After Effects?
I have the single app plan for $20/mo, for After Effects. I've come to realize that I would like, as well as I kind of need, Photoshop. However, I don't wish to purchase the complete plan ($50/mo). I noticed there is a Photography plan for $10/mo, however since I already have a plan I'm unsure as to how I would go about getting two plans, or if there is a way to add on to my current plan. If I have the Photography and the Single App plan together it would be $30/mo, and I would have everything I need for $20 less than the complete.
Any viable options, advice, or suggestions would be much appreciated.
Thanks,
- InfinityYou can of course get the photography plan, you just do not "add" it. It's simply a completely separate purchase.
Mylenium -
hello sir,
I am developing a GUI screen from that i want to write and read a hex file from the flash buffer of the microcontroller through the USB serial port. the driver i am using is FTDID2XX driver.if anyone having examples of loading file through serial port.Please reply me .
ThanksLooks like you should post your request in the LabVIEW forum, this one here preferentially is for LabWindows/CVI...
-
DAQ vi to perform digital write and read measurements using 32 bits binary data saved in a file
Hi
DAQ vi to perform digital write and read measurements using 32 bits binary data saved in a file
Two main
sections:
1)
Perform
write and read operations to and fro different spread sheet files, such that
each file have a single row of 32bits different binary data (analogous to 1D
array) where the left most bit is the MSB. I don’t want to manually enter the
32 bits binary data, I want the data written or read just by opening a file
name saves with the intended data.
2)
And
by using test patterns implemented using the digital pattern generator or build digital data functions or otherwise, I need to
ensure that the
binary data written to a spreadsheet file or any supported file type
then through the NI-USB 6509 is same as the data read.
I’m aware I can’t use the simulated
device to read data written to any port but if the write part of the vi works I
‘m sure the read part will work on the physical device which I’ll buy later.
My Plan
of action
I’ve
created a basic write/read file task and a write/read DAQ task for NI USB 6509
and both combine in a while loop to form a progress VI which I’m confuse of how
to proceed with the implementation.
My
greatest problem is to link both together with the correct functions or operators
such that there are no syntax/execution errors and thus achieve my intended
result.
This
project is one of my many assignments for my master thesis, so please i’ll
appreciate every help as I’m not really efficient with LabVIEW programming but
I prefer it because is fun and interesting if I get to know it.
Currently I’m
practicing with LabVIEW 8.6/NI DAQmx 8.8 Demo versions and NI USB 6509
simulated device.
Please see
the attached file for my novice progress, thanks in
advance for the support
Rgds
Paul
Attachments:
DIO_write_read DAQ from file.vi 17 KBWhat does your file look like? The DAQmx write is expecting a single U32 value, not an array of I64.
Message Edited by vt92 on 09-16-2009 02:42 PM
"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal -
HOW TO CREATE SEVERAL folder for the generation and READING FILE
HOW TO CREATE SEVERAL folder for the generation and READING FILE WITH THE COMMAND utl_File.
please give an example to create 3 folders or directories ...
I appreciate your attention ...
Reynel Martinez SalazarI hope this link help you.
[http://www.adp-gmbh.ch/ora/sql/create_directory.html]
create or replace directory exp_dir as '/tmp';
grant read, write on directory exp_dir to eygle;
SQL> create or replace directory UTL_FILE_DIR as '/opt/oracle/utl_file';
Directory created.
SQL> declare
2 fhandle utl_file.file_type;
3 begin
4 fhandle := utl_file.fopen('UTL_FILE_DIR', 'example.txt', 'w');
5 utl_file.put_line(fhandle , 'eygle test write one');
6 utl_file.put_line(fhandle , 'eygle test write two');
7 utl_file.fclose(fhandle);
8 end;
9 /
PL/SQL procedure successfully completed.
SQL> !
[oracle@jumper 9.2.0]$ more /opt/oracle/utl_file/example.txt
eygle test write one
eygle test write two
[oracle@jumper 9.2.0]$
SQL> declare
2 fhandle utl_file.file_type;
3 fp_buffer varchar2(4000);
4 begin
5 fhandle := utl_file.fopen ('UTL_FILE_DIR','example.txt', 'R');
6
7 utl_file.get_line (fhandle , fp_buffer );
8 dbms_output.put_line(fp_buffer );
9 utl_file.get_line (fhandle , fp_buffer );
10 dbms_output.put_line(fp_buffer );
11 utl_file.fclose(fhandle);
12 end;
13 /
eygle test write one
eygle test write two
PL/SQL procedure successfully completed.
SQL> select * from dba_directories;
OWNER DIRECTORY_NAME DIRECTORY_PATH
SYS UTL_FILE_DIR /opt/oracle/utl_file
SYS BDUMP_DIR /opt/oracle/admin/conner/bdump
SYS EXP_DIR /opt/oracle/utl_file
SQL> drop directory exp_dir;
Directory dropped
SQL> select * from dba_directories;
OWNER DIRECTORY_NAME DIRECTORY_PATH
SYS UTL_FILE_DIR /opt/oracle/utl_file
SYS BDUMP_DIR /opt/oracle/admin/conner/bdumpRegards salim.
Edited by: Salim Chelabi on Apr 4, 2009 4:33 PM -
How can i write and read the same data
hi,
i have attached my program to this mail. i have some problems in this program.
problems:
1. I want to select the threshold for the rms,varience and s.d.
But what i used is not doing that. i want to fix the upper threshold value and lower threshold value.
when ever the input crosses upper threshold value i want the output and it will remains uptill the value above the lower threshold value.
Once it come down the lower threshold value the output should be stopped.
2. I want to write this in to a file and i want to read this file. is this possible or not.
please try to help me i am very new with lab view6i
REGARDS
CHAMARTHY KOMAL DILEEP.
[email protected]
Attachments:
dileep.vi 93 KBThe easiest way to perform a certain action (such as file I/O) based on a certain condition (such as whether a value has passed a certain threshold) is to use a comparison VI in combination with a case structure. Then you can specify that if your rms, standard deviation and variance are above a threshold then perform a certain action.
Also consider using shift registers to keep track of data from the last loop. If I understand you correctly, you want to start logging data when an upper threshold has been passed. Then you want to continue logging data until a lower threshold is passed. I have attached a non-functional but explanatory VI that will help explain how to implement logic to that effect. It also demonstrates that you can indeed write and read from the same file in a loop. The best way to do this is to open the file before the loop, do all the necessary writing and reading in the loop, and then close the file after the loop.
Hope this helps!
Jarrod S.
National Instruments
Attachments:
dileep_example.vi 61 KB -
NI 6602 Write and Read Frequency
Hi all ,
I Have NI 6602 timing card and i'm trying to use it in order to write and read using the
DAQmxWriteCtrFreq (taskHandle1, 0, 1, 10.0, DAQmx_Val_GroupByChannel, &freq, &duty, &writtenVal, 0);
and
DAQmxReadCounterScalarF64(taskHandle2,10.0,&dataVal,0);
what i'm trying to do is to write to ctt0 and to read from ctr7 ( they are crossed in the card )
i'm having a bit problems with that can some one give me a tip on how to do it properly ?
just write freq to ctr0 and read freq from ctr7.....
Kobi Kalif
Software Engineer
Solved!
Go to Solution.You should have the following sample installed on your PC that may help you in this task: DigPulseTrain-Cont.prj (it could be located in \program files\National Instruments\CVIx\samples\daqmx\counter\generate pulse folder)
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos? -
I deployed the ear file.Now i try calling http://localhost/myapps/test.jsp ??
i'm i doing the right thing ?Hi,
This is right provided you have installed the webserver & app server
on the same machine and the port number for the web server is 80 by
default.
Regards
Raj
Arif Khan wrote:
I have a created a directory structure
ias\ias-samples\myapps\src\docroot.In docroot folder i have a single
jsp.i created a war file having that jsp,and ear file having the war
file
I deployed the ear file.Now i try calling
http://localhost/myapps/test.jsp ??
i'm i doing the right thing ?
Try our New Web Based Forum at http://softwareforum.sun.com
Includes Access to our Product Knowledge Base! -
How can i update my old 2006 iMac Intel core 2 duo running 10.6.8 to OSX Lion so that I can sync using iCloud with my newer devices? Mountain Lion is not an option for my older model and Lion is no longer available at App store.
Call Apple's online store's telesales agents: 1-800-MY-APPLE (1-800-692-7753) or Customer Service and Sales Support at 1-800-676-2775. For Lion you'll get a redemptions code via e-mail and need to DL from the Mac Apple Store (requires SL 10.6.6+).
-
I was wondering why the iPhone 5 has the option for a battery percentage and the iPod touch 5g doesn't? I mean... they are almost both the same thing... just the iPod does not have the phone.
One likely reason is the % battery is not that accurate because of the smaller battery capacity in the iPod compared to iPhone and iPad. Users why use a % battery app post that the % reading changes a lot.
-
The value should be set for Base image URL and Image file directory
Hi experts
Now customer has the following issue.
XML Publisher concurrent request, using RTF layout template with LOGO, does not generate the LOGO for Excel output.
but in output formats PDF, it is shown normally.
from the debug log, we can found the following error message
======
[051812_054716051][][ERROR] Could not create an image. Set html-image-dir and html-image-base-uri correctly.
======
so I tell the customer to do the following action plan.
1. in XML Publisher Administrator resp > Administration expand the HTML Output section.
2a. enter a value for 'Base image URI'
2b. enter a value for 'Image file directory'
Customer set the value as following and retest this issue,but he found the issue is not solved.
Base image URI: /u01/r12/ebssnd/apps/apps_st/comn/java/classes/oracle/apps/media/XXSLI_SONY_LIFE_LOGO.gif
Image file directory: /u01/r12/ebssnd/apps/apps_st/comn/java/classes/oracle/apps/media
I verified 'Base image URI' and 'Image file directory' settings:
1) Change output type to HTML.
2) Click the Preview.
but the image is correctly displayed on HTML, so I think the issue is caused by user's uncorrectly setting of the base image URL and/or image file directory
but could anyone give me some advice on which value should be set for Base image URL and Image file directory
Regards
shuangfeiFirst thing to do is to edit the post and use some tags to format the code as it is unreadable and too much!
Read the FAQ (https://forums.oracle.com/forums/help.jspa) to find out how to do this.
Next we need to know the jdev version you are using!
As the code is generated I would first try to generate it again after the db change.
Timo -
How to write and read Japanese on my Nokia E5
I am trying to find out how I can write and read Japanese on my Nokia E5.
I even don't knwo if it's possible...
Does anyone have the answer???Hello ikokitakun,
I believe you have to load a version of software on your phone that has the Japanese language pack in it because the version of software on the phone only has the languages for the region that you bought the phone in. for example if i bought my phone in NZ it would have English, Malaysian and maybe Philippino. There are "dodgey" places you can go to get the software changed but if you do this you void your warranty so be careful. Nokia doesn't condone the changing of regional software.
Hope this helps
-Cheers
"Freedom is the only way, yeah!" -
Re: Best options for exporting a sequence and making a DVD
I using iPad 2.
"Re: Best options for exporting a sequence and making a DVD" and "I'm using iPad 2" and "My phone number is not verified!" don't seem to be entirely related. Can you please restate your question?
Maybe you are looking for
-
Hi Is there any provision or api in MAC to open a file in shared mode same as windows hUSBdrive = CreateFile(pDriveName, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, NULL, OPEN_EXISTING, FILE_FLAG_NO_BUFFERING, NULL); we have
-
When KF value only provided at higher level and not at more detailed level
Dear Experts I have a multiprovider consisting 2 DSOs: 1. DSO for price. Eg. Char-A__Char-sub1___Char-sub2___KF_PRICE AAAA__ AA11________AA22________$10 AAAA__AA11_________AA23_______ $17 As shown above, AAAA is made up of 2 sub-items AA22 and AA2
-
Using MacBook Pro As Secondary Monitor?
Just purchased a MacBook Pro (Intel Duo-Core i7 w Lion installed) and own a Mac Pro Dual Core Intel for my work. On the tower I am running OSX 10.5.8. Would like to use the the MBP as a secondary monitor to the tower. Have looked around trying to
-
What's email/phone support info for QTPro? won't display fullscreen/player
I couldn't get QT standard to display in full screen or have player tabs, like it does in Itunes, when I clicked on streaming video or audio that used QT on Websites. So I paid extra for QT PRo and it still doesn't display in full screen or have any
-
Compile flag for the endian neutral conversion on x86_x64 systems
I am struggling to work on the endianess issue porting the driver and application codes from Sparc to x64 system. The device driver just copies the data in and out the structure from the kernel space to user space or from the user space to kernel spa