Pbs to read and write messages on the same port
Hello,
I am novice so I do some tests to send messages with the example : CAN trasmit periodic, and to receive messages with the Channel Monitor, so I want to use this two VIs in my program but there is an error because I can't use the two examples at the same time...
How can I proceed to use this two example in my program? There is an other solution to read and write in the same time (I use a database .dbc)?
Bye
I'm sorry for my mistake but CAN transmit periodic exist in two version, one for FPGA and other for PC card. I didn't see the second one.
You can monitor your CAN bus with NI-CAN BusMonitor: How Can I Monitor the NI-CAN Bus?
Regards,
Aurélien J.
National Instruments France
#adMrkt{text-align: center;font-size:11px; font-weight: bold;} #adMrkt a {text-decoration: none;} #adMrkt a:hover{font-size: 9px;} #adMrkt a span{display: none;} #adMrkt a:hover span{display: block;}
>> Du 30 juin au 25 août, embarquez pour 2 mois de vidéo-t'chat ! Prenez place pour un voyage au coe...
Similar Messages
-
How can I have both functions "Read Only" & "Write" mode on the same form?
Dear all,
How can I have both functions "Read Only" & "Write" mode on the same form? Is it possibile for this?
Please advice,
AmyThis is what I use in some dialogs:
PROCEDURE SET_QUERY_ONLY IS
-- Procedure Set_query_only
-- Rend les blocks non modifiables --
-- Disable menus Insert/Delete/Clear --
-- Entree :
-- Sortie :
-- Ent/Sortie :
-- Creation : FD 10/2003
-- Modification :
LC$Block Varchar2(30) ;
BEGIN
Set_Menu_Item_Property('Edit.Insert', ENABLED, PROPERTY_FALSE ) ;
Set_Menu_Item_Property('Edit.Remove', ENABLED, PROPERTY_FALSE ) ;
Set_Menu_Item_Property('Edit.Clear', ENABLED, PROPERTY_FALSE ) ;
Set_Menu_Item_Property('Action.Save', ENABLED, PROPERTY_FALSE ) ;
LC$Block := get_form_property( NAME_IN('System.Current_Form'), FIRST_BLOCK ) ;
-- Tous les blocs en Query only --
While LC$Block is not null Loop
Enable_Block( LC$Block, FALSE ) ;
LC$Block := get_block_property( LC$Block, NEXTBLOCK ) ;
End loop ;
END;
PROCEDURE ENABLE_BLOCK
PC$Block in Varchar2,
PB$Enable in Boolean Default TRUE
) IS
-- Procedure Enable_block
-- Rend le bloc Enable / Disable --
-- Entree : PC$Block (nom du bloc Forms)
-- : PB$Enable (TRUE ou FALSE)
-- Sortie :
-- Ent/Sortie :
-- Creation : FD 10/2003
-- Modification :
BEGIN
If PB$Enable Then
Set_Block_Property( PC$Block, INSERT_ALLOWED, PROPERTY_TRUE ) ;
Set_Block_Property( PC$Block, UPDATE_ALLOWED, PROPERTY_TRUE ) ;
Set_Block_Property( PC$Block, DELETE_ALLOWED, PROPERTY_TRUE ) ;
Set_Menu_Item_Property('Edit.Insert', ENABLED, PROPERTY_TRUE ) ;
Set_Menu_Item_Property('Edit.Remove', ENABLED, PROPERTY_TRUE ) ;
Set_Menu_Item_Property('Edit.Clear', ENABLED, PROPERTY_TRUE ) ;
Set_Menu_Item_Property('Action.Save', ENABLED, PROPERTY_TRUE ) ;
Else
Set_Block_Property( PC$Block, INSERT_ALLOWED, PROPERTY_FALSE ) ;
Set_Block_Property( PC$Block, UPDATE_ALLOWED, PROPERTY_FALSE ) ;
Set_Block_Property( PC$Block, DELETE_ALLOWED, PROPERTY_FALSE ) ;
Set_Menu_Item_Property('Edit.Insert', ENABLED, PROPERTY_FALSE ) ;
Set_Menu_Item_Property('Edit.Remove', ENABLED, PROPERTY_FALSE ) ;
Set_Menu_Item_Property('Edit.Clear', ENABLED, PROPERTY_FALSE ) ;
Set_Menu_Item_Property('Action.Save', ENABLED, PROPERTY_FALSE ) ;
End if ;
END;Francois -
Is it possible to get the style, font and related info of a paragraph text of a in design file and write all the stuff on the same in design file on the left side with small fonts
as
Lets this is a text in in design file :
style : abc we are going to check the condition Agence Wallonne pour la Promotion d'une Agricultur we are going to check the condition Agence Wallonne pour la font 12 d'une Agricultu we are going to check the condition Agence Wallonne pour la Promotion d'une Agricultu
style : xyz we are going to check the condition Agence Wallonne pour la Promotion d'une Agricultur we are going to check the condition Agence Wallonne pour la font 10 d'une Agricultu we are going to check the condition Agence Wallonne pour la Promotion d'une AgricultuHi Poojith
Not sure if this would solve your requirment but just in case might be helpful:
1. We can mix up the HTML and HTMLB components in the JSP Page. However, can access only the HTMLB components in the controller. The following link refers to what customizations are offered by the HTMLB framework:
[http://www.sapdesignguild.org/resources/htmlb_guidance/]
2. Another option would be to use AbstractPortalComponents or a simple web app if that's feasible. (where custom UI themes, css and layout are more in control of the developers.)
Thanks
Deepak -
CAN AN EXCEL XLSM FILE READ FROM A CSV AND WRITE BACK TO THE SAME XLSM -VBA
Hey Carlos- Here's the repost.
Could an XLSM file read a line from a CSV file in "A1" and depending on what was in the first column in the XLSM, search the CSV file and find the indexed item in the second column or third? I've done it before with standard VLookup functions and it was cumbersome and very slow, and for some reason, everytime I would save the file it would take forever although the xls file was a single sheet.
i've attacthed a sketch of what I'm talking about, because it's hard to explain and I think the sketch explains it better. Here it is, sorry if it is blurry, it looked fine before I posted:ok, use this version, I changed it a bit. To accommodate the issue with the single cell, I moved the main procedures to a function for a more efficient use.
Sub xlsmCsvLookup()
'have both your xlsm and your csv files open
'in the xlsm file, select a range of cells to look up
'run the script to search all selected cells and get the values from the csv file
Dim csvDataRange As Range 'csv file data column
Dim selRange As Range 'to hold selected cells
Dim foundRange As Range
'get the source range
Set csvDataRange = Workbooks("Book2.csv").Sheets(1).Range("a:a") ' replace "Book2" with yourCSVfile.csv
'check for selection, only one cell, ceck that cell and exit, otherwise loop thru selection
If Selection.Count > 1 Then
'loop thru all selected cells, ignore empty cells
For Each selRange In Selection.SpecialCells(xlCellTypeConstants)
findSelection selRange, csvDataRange
Next
Else
findSelection ActiveCell, csvDataRange
End If
Set foundRange = Nothing
Set selRange = Nothing
Set csvDataRange = Nothing
End Sub
Function findSelection(selRange, csvDataRange)
'try to find it in the csv file
Set foundRange = csvDataRange.Find(selRange) 'if found, assign it to foundRange
'if no match highligh cut
If foundRange Is Nothing Then
selRange.Interior.ColorIndex = 34
Else
'if found, get the value in next cell
selRange.Offset(0, 1) = foundRange.Offset(0, 1)
End If
End Function -
Help with how to read and write files to the applets server
I am writing a form that requires some data to be written serverside(not on the host machine) and I also need to be able to read from those same files.
Can anyone provide any help?
I looked into signing but it seems, to me, that signing is for when you are going to be modifying files on the host...brianb7590 wrote:
Would I use that to refer to the file like I would with a regular application?Nope. It's pretty complicated. You've got to set something up on the server to accept requests, get all the data and then save files somewhere and on the client side you've got to make the connection and send the data.
Edited by: tjacobs01 on Apr 13, 2009 5:49 PM -
Using 802.1x and 2 hosts (one physical and one virtual) on the same port
Hello,
We trying to utilize the following scenario:
BYOD with users' windows based laptops and Apple Mac Books
Virtual machines within each of the physical machines: For Windows, the VMs will be Windows 7 VMs running within VM Workstation. For Macs, users will be running Windows 7 VMs within Fusion.
802.1x set for multi-host
Using 802.1x, we have a guest network that places the user's physical machine in once it fails authentication. The virtual machine runs the corporate image, and we'd like to have this VM connected to our corporate VLAN.
We have been running into this scenario though:
1. User plugs his BYOD laptop from into the network. His laptop gets attached to the guest network because it fails the 802.1x check.
2. The VM is powered on. It successfully is connected to the corporate network.
3. Now, the user unplugs his network cable from his host machine and waits 10 seconds.
4. He then re-plugs the network cable to his host machine.
5. The VM is the first to authenticate to the 802.1x network and it gains access to the corporate network.
6. Due to the VM being the first to authenticate on 802.1x, the host network connection piggybacks off of the VM, and therefore the host gains access to the corporate network
Obviously this represents a no-go if the user's BYOD computer is able to access the corporate network. Is there is any specific way that 802.1x can be configured to prevent this from happening?
Thanks,
MoogeMulti-Host is not the right option for you. In this Multi-Host only one device has to successfully authenticate to authenticate all device on that port.
You need to set host-mode to "multi-auth" -
How do I unblock port 3689 which, in its blocked state, appears to be preventing me from using my I Pad with ITunes ? This Port 3689
is becoming famous. Is APPLE on the case with this problem? LRCWhat make and model of firewall software are you running on the PC, Ron?
-
Need help to read and write using UTF-16LE
Hello,
I am in need of yr help.
In my application i am using UTF-16LE to export and import the data when i am doing immediate.
And sometimes i need to do the import in an scheduled formate..i.e the export and imort will happend in the specified time.
But in my application when i am doing scheduled import, they used the URL class to build the URL for that file and copy the data to one temp file to do the event later.
The importing file is in UTF-16LE formate and i need to write the code for that encoding formate.
The problem is when i am doing scheduled import i need to copy the data of the file into one temp place and they doing the import.
When copying the data from one file to the temp i cant use the UTF-16LE encoding into the URL .And if i get the path from the URl and creating the reader and writer its giving the FileNotFound exception.
Here is the excisting code,
protected void copyFile(String rootURL, String fileName) {
URL url = null;
try {
url = new URL(rootURL);
} catch(java.net.MalformedURLException ex) {
if(url != null) {
BufferedWriter out = null;
BufferedReader in = null;
try {
out = new BufferedWriter(new FileWriter(fileName));
in = new BufferedReader(new InputStreamReader(url.openStream()));
String line;
do {
line = in.readLine();
if(line != null) {
out.write(line, 0, line.length());
out.newLine();
} while(line != null);
in.close();
out.close();
} catch(Exception ex) {
Here String rootURL is the real file name from where i have to get the data and its UTF-16LE formate.And String fileName is the tem filename and it logical one.
I think i tried to describe the problem.
Plz anyone help me.
Thanks in advance.Hello,
thanks for yr reply...
I did the as per yr words using StreamWriter but the problem is i need a temp file name to create writer to write into that.
but its an logical one and its not in real so if i create Streamwriten in that its through FileNotFound exception.
The only problem is the existing code build using URL and i can change all the lines and its very difficult because its vast amount of data.
Is anyother way to solve this issue?
Once again thanks.. -
Read and write from and to text file
Hi All,
I am trying to read some portion of a text file and make measurement and calculation with those numbers and write back to the same text file and also to a excel file. I need to create a 2 D array of 20 by 20 from the text file values and write to front panel table and to text file. but I am having problem with it, obviously I am new to this. Please help me. thanks much
~ JohnnyHi Lynn,
the requirement is to move C1 and C2 to each position that is given in the text file in steps and percentage value.
for example C1 has to go to first step (5%) and C2 has to go thru all steps, 5% to 95% , in 5 percent increment.
each 100 steps translates to 1 percent increment in the capacitor value.
at the end, I need to enter the measured data (values of C1 for each step, vesus all values of C2 for all steps) and enter them at the bottom of the text file's table where it starts at : "IMPEDANCE_REAL in Ohmone line per C1 position, containing all values for the different C2 positions" and do the same for where it says "IMPEDANCE_IMAGINARY in Ohmone line per C1 position, containing all values for the different C2 positions"
the reason I read the file twice, is that if it read it once, I couldn't connect it to spreadsheet string to array vi.
as you can see, I also like to use the write to measurement file and build table express vi's to display the table on the front panel and save the data to ni data file format so later I convert it to excel too.
any thoughts?
thanks for your help
~ Johnny
Attachments:
read from text2.vi 82 KB -
Hot Data Block with concurrent read and write
Hi,
This is from ADDM Report.
FINDING 8: 2% impact (159 seconds)
A hot data block with concurrent read and write activity was found. The block
belongs to segment "SIEBEL.S_SRM_REQUEST" and is block 8138 in file 7.
RECOMMENDATION 1: Application Analysis, 2% benefit (159 seconds)
ACTION: Investigate application logic to find the cause of high
concurrent read and write activity to the data present in this block.
RELEVANT OBJECT: database block with object# 73759, file# 7 and
block# 8138
RATIONALE: The SQL statement with SQL_ID "f1dhpm6pnmmzq" spent
significant time on "buffer busy" waits for the hot block.
RELEVANT OBJECT: SQL statement with SQL_ID f1dhpm6pnmmzq
DELETE FROM SIEBEL.S_SRM_REQUEST WHERE ROW_ID = :B1
RECOMMENDATION 2: Schema, 2% benefit (159 seconds)
ACTION: Consider rebuilding the TABLE "SIEBEL.S_SRM_REQUEST" with object
id 73759 using a higher value for PCTFREE.
RELEVANT OBJECT: database object with id 73759
SYMPTOMS THAT LED TO THE FINDING:
SYMPTOM: Wait class "Concurrency" was consuming significant database
time. (4% impact [322 seconds])
what does it mean by hot block with concurrent read and write??
is rebuilding the table solves the problem as per addm report?Hi,
You must suffer from buffer busy waits.
When a buffer is updated, the buffer will be latched, and other sessions can not read it or write it.
You must have multiple sessions reading and writing that one block.
Recommendation 2 results in fewer records per block, so less chance multiple sessions are modifying and reading 1 block. It will also result in a bigger table.
The recommendation doesn't make sense for tablespaces with segment storage management auto, as for those tablespaces pctfree does not apply.
Buffer busy waits will also occur if the blocksize of your database is set too high.
Sybrand Bakker
Senior Oracle DBA -
Which possibilities did I have when I want to read and write Files from the harddisk?? ( It must run in an Applet)
Please describe the way(s) to access 'io' in applets.
Thanks a lot!!!You can't do "normal" io from an applet or japplet. There are ways of getting around it though. Look at this post - it will help:
http://forum.java.sun.com/thread.jsp?forum=5&thread=9769 -
Digital I/O why can't I have line outs and line ins in the same application?
I have a problem with my digital lines. I have several "write to digital line" VIs, and I also need some "read from digital line" VIs. My problem is that when I supply 5V to the line in, it doesn't register high. I checked this on a separate program, and when I did not have a "write to digital line" , the "read from digital line" was at 5V (I checked it with a multimeter). As soon as I included a "write to digital line" in the program, the input was jumping around 1.3V. What is the problem here?
Hello,
I apologize for the delay in responding to your question. You are writing to digital channel 0. This is the same thing as digital port 0. A port is simply a collection of digital lines. Since you are reading and writing to lines 0-7 on channel 0, the Write to Digital Line and Read from Digital Line VIs are resetting the state of the port every time they are called. I notice you have wired a 0 to the iteration count of all the write VIs, but nothing to the read VIs. To fix this problem,
Wire a 1 to the iteration input of all the write VIs except for one. This last VI you can either wire a 0, or leave it unwired as 0 is the default.
Wire a 1 to the iteration input of all the read VIs.
I have m
odified your VI in this way and attached it below. Ideally, you would want to write to a line with 0 for the iteration count only once (outside the loop). The modified VI will do it at the beginning of every loop iteration. I have tested it here and it seems to work without problems. The reason for the modification is that both the high level read and write VIs reset the port when they are called unless you wire a nonzero number to the iteration input. This effectively tells the VI that the port has been initialized and it can skip it.
Feel free to post again if you have further questions. Happy coding,
Grant M.
National Instruments
Attachments:
dio_problem.vi 75 KB -
Can you do Digital In or Out on the same port (byte) as PFI timing?
I'm using an M series board with three digital ports. Port 0 is only for DIO, ports 1 and 2 can be used for DIO or PFI (e.g. clocking, triggering). My question is: can I do both DIO and PFI functions on any one port. For example, on Port 1, I would like to use bits 0 to 6 as Digital Inputs and have an external clock signal go into bit 7 as a clock for Analog Out. Can the port be mixed like this?
Thanks,
Dave
David Thomson Original Code Consulting
www.originalcode.com
National Instruments Alliance Program Member
Certified LabVIEW Architect
There are 10 kinds of people: those who understand binary, and those who don't.Dave,
The DIO lines on any DAQ device that uses the DAQ-STC ASIC can be configured on a per line basis, so using PFI and DIO lines on the same port will work just fine.
You can run a quick test on this using the "Gen Dig Pulse.vi" example (found in the NI Example Finder under Browse -> Hardware Input and Output -> DAQmx -> Generate Digital Pulses). You should be able to generate a pulse on one of the PFI lines on the board, then read that pulse back in on one of the DIO lines of that port using an external connection.
-Justin -
When I move this version (3.6.12) to the applications folder on a new i-Mac, I get the message that I "do not have permission to access some of the items." I do have read and write rights on all applications and hard drive. Any ideas?
* Download a new copy of the Firefox program: http://www.mozilla.com/firefox/all.html
* Trash the current Firefox application to do a clean (re)install.
* Install the new version that you have downloaded.
Your profile data is stored elsewhere in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder], so you won't lose your bookmarks and other personal data. -
How do I read and write on the same CAN Port
I have a PXI chassis with a NI PXI 8464 CAN card. I am learning to use this device. I am trying to send messages back and forth between the two ports on the card. I have four simple VIs:ReadWas; WriteWas;ReadSteering; and WriteSteering. I have been starting the read VIs first then starting the write VIs. When I start the write VIs I get an error from CAN init saying I am trying to change an object that is running.
Is it possible to send and receive on the same port of the CAN card without stopping then reinitializing the card?
I have attached ReadWas, ReadSteering and WriteSteering to this post. ReadWas and WriteSteering share a CAN port.
Any help is greatly appreciated,
Thanks,
Phillip
Attachments:
ReadWAS.vi 112 KB
ReadSteering.vi 143 KB
WriteSteering.vi 114 KBhave you looked at this example, (CAN Send & Receieve using NI-CAN Frames) it is in the example code section
http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=E993D9B56C3D2BABE0340003BA230ECF&p_...
http://sine.ni.com/apps/we/niepd_web_display.DISPLAY_EPD4?p_guid=E993D9B56C3D2BABE0340003BA230ECF&p_...
Basically, you are getting the error because the second time you call CANconfig it realizes it is already open. Try consolidating the 2 pieces of code into 1 CAN VI.
Maybe you are looking for
-
Calendar events created on iphone do not sync to ical...
I have created several events on my iphone calendar then watched them disappear when performing a sync with my laptop. I have gone to itunes, hi-lited my iphone (when mounted) then gone to "info" tab in itunes, I've selected "home" where it says "Put
-
New to Garageband - can't cut a section of audio in this application!?!
Used a ton of NLEs in the past ... very 1st thing I try w/Garageband doesn't seem to work. Have an audio track on the screen, open up the editor below, select a region of audio, click "edit ... cut". And it deletes EVERYTHING from the beginning of my
-
Proxy to SOAP with an attachment
Hi all, we have a scenario proxy to soap,and the volume of data sending from proxy to soap is more than 20 mb. as the third party system can't receive 20MB of data in one single soap message and we can't split this message as the whole data is relate
-
Podcast Capture start/stop shortcut key
I am attempting to create a podcast using Podcast Capture. The podcast will include a Keynote presentation. Podcast Capture does not start when I use the shortcut key (command F2) while playing the Keynote presentation. I have selected the "Allow Exp
-
My system preferences won't load. It opens straight up to the desktop folder and pictures won't load, leaving me with a color wheel. I've tried restarting my computer and that doesn't help. System preferences just won't open/load at all. Any ideas?