Is the data sent to COM Hex string?
First.I don't know who should change the data to ASCII,me or COM ?
Second,I want to know if the data sent to COM is only Hex string?
In Labview, the data sent to the com port is usually a string that is sent to the com port as the hex equivalent. If you want to send hex, use the \ codes for stings while displaying the string in slash codes format. The only thing being sent to the com port is hex.
The data received on the com port is usually hex that is interpreted into ascii by LabVIEW. Sometimes the sender of the com data formats the information in another way. The programmer will have to convert data (which looks like gibberish in a string) into the proper format.
Jeremy Braden
National Instruments
Similar Messages
-
I'm talking to a Furness micromanometer. It sends a string of three lines formatted as follows:
Time xx:xx:xx xM
Velocity xxxxx ft/m
Temperature xxx.x degC
I want to watch the input, and when I see the EOF character (ctlZ), I want to display the three lines of text sent since the last EOF. Any help is appreciated.Lynn, attached is the original vi I wrote months ago. It works, but occasionally there seems to be a disconnect between the instrument and LabVIEW. The string received is shown in the upper left corner of the front panel (Micromanometer output) is the string last received. Then it's parsed out into teh three columns. AS you can see from the block diagram, I made a rather complex vi, although that was NOT my intent. Occasionally, as I said, things don't work right. Instaed of the first line beginning with "Velocity", it might read "city" and then everything is sort of offset, and the data is corrupt. After closing and reatarting LabView it usually works correctly. SO, I decided to go with a simpler, less complex approach. Instead of sending the T to the instrument to trigger it, I simply set the Furness to sample at one second intervals (locally - on its front panel interface)and send its data out on the serial port. Then I want Labview to monitor the port, and read the data whenever it sees there is date to read. I don't know if I can use EOF or the start bit, or what. I just wrote an application like this for another instrument, but I was able to determine the number of bytes in the string (19). I just used a property node (Bytes at port), compared the numer to 19, and if it was greater than or equal to 19, I read the port. It works great, but I can't seem to get a handle on what I'm doing wrong here. Anyway, attached is the old vi, as well as the beginning of the new one. Help??!!!
Attachments:
Furness.vi 291 KB
simple.vi 75 KB -
I am new to LabView, so please bear with me...
I tried to communicate with an RS485/2-wire device through COM1. I used Instrument I/O Assistant (and Advanced/Basic Serial Write and Read examples) to write command (HEX string) to COM1,
tried writing HEX strings with and withour end bye (is 0D0A the correct end signal for HEX string?). Both didn't get device's responce. Looks like the device didn't recognize the command.
I monitored the transmitted signals on the bus, they were not differential as supposed to be.....
What is the possible reason to cause this? Please help...
The hardware connection is OK, because I am able to communicate with the device through COM1 (with the same command) using different software application.How are you sending the hex? Is your string control set for hex display or normal? If it's set for normal, then if you send something like 'AD', then you aer sending the ASCII characters 'A' and 'D' and that's not the same thing. I don't believe the I/O assistant can send hex but you can modify the basic serial write and read to do so. Just right click on the string control and select 'Hex Display'. You can also enter the data in a numeric control (set for dex display) and use a type cast or an array of U8's and use the Byte Array to String function. Hex data usually doesn't use any kind of termination characters such as CR/LF.
If communication is working with another app, then as you said, the hardware is okay and it's not a problem with differential signaling. -
The New photos app is taking a very long time to upload images. It stays a very long time at 20,104 for example. When I check the Activity Monitor (Network) it shows that the computer is actually uploading stuff. After about 2 hours, only 20 Pics&Videos are uploaded. The uploaded pics and videos are about 500MB while the data sent is around 1GB. I am positive that Photos is the only thing uploading data at the moment.
Anyone else facing this problem?It can take days, even weeks.
Tell me 2 things and I will tell you the estimated upload time.
1 How big is your Library (in GB)
2 How fast is your upload speed.
Or you can just use the upload time calculator and do it yourself -
What happens between the timestamp 'Date Sent' and 'Execute from'
Hi all,
from SXMB_MONI, I found that some messages take a long time, for example:
Date Sent 23.09.2008 02:22:39
Time Taken to Process (Secs) 0,5044590
Execute From 23.09.2008 02:23:12
To 23.09.2008 02:23:13
Status Set 23.09.2008 02:23:13
you can find that there are about 30s between the 2 timestamps.
does anybody know what does the timestamp 'Date Sent' mean? and what does the 'Execute From' mean?
what happens between these 2 timestamps?
Regards,
BeanHi,
I can't find date sent there...
Executed from and executed to means times, where message went in to IE and out from IE. For example, if any error occurs, there can be difference 2 days (mapping fails, you correct it and restart the message). So the start will be at 21.10.2008 but end 23.10.2008). But generally, this time comrpises:
message routing & mapping
Olian
after list all of the messages in SXMB_MONI, click the column 'EndTime', you will find the 'Date Sent'. -
JDODataStoreException: The instance null does not exist in the data store
I'm unable to figure out how this exception occurs.
I have a class IDCounter which has a number of fields such as
'm_Name' (String)
'm_AccountName' (String)
'm_UserName' (String)
'm_Description' (String)
'm_CreationDate' (Date)
'm_LastModifiedDate' (Date)
'm_DeletedDate' (Date)
'm_Count' (long)
The filter I'm using is "m_AccountName == \"test\" && m_UserName
==\"test\" && m_DeletedDate == null"
The generated SQL statement is "SELECT t0.M_IDX, t0.JDOCLASSX,
t0.JDOLOCKX, t0.M_ACCOUNTNAMEX, t0.M_CREATIONDATEX, t0.M_DELETEDDATEX,
t0.M_DESCRIPTIONX, t0.M_LASTMODIFIEDDATEX, t0.M_NAMEX, t0.M_USERNAMEX,
t0.M_COUNTX FROM ABSTRACTENTITYX t0 WHERE ((t0.M_DELETEDDATEX IS NULL) AND
t0.JDOCLASSX = 'com.ewarna.pdm.entities.IDCounter')"
Exception Trace:
javax.jdo.JDODataStoreException: The instance null does not exist in the
data store.
at
com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.instantiateRow(LazyResultList.java:165)
at
com.solarmetric.kodo.impl.jdbc.runtime.LazyResultList.get(LazyResultList.java:96)
at java.util.AbstractList$Itr.next(AbstractList.java:416)
at
com.solarmetric.kodo.runtime.ResultListIterator.next(ResultListIterator.java:49)
at
com.solarmetric.kodo.impl.jdbc.runtime.ResultListFactory.createResultList(ResultListFactory.java:85)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.executeQuery(JDBCStoreManager.java:646)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCQuery.executeQuery(JDBCQuery.java:150)
at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:580)
at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:428)
at
com.solarmetric.kodo.query.QueryImpl$SynchronizedQuery.execute(QueryImpl.java:1331)
at
com.ewarna.pdm.sessions.persistence.BasicQuery.getByAdvancedFormula(BasicQuery.java:78)
at
com.ewarna.pdm.sessions.persistence.BasicQuery.getByFormula(BasicQuery.java:119)
at
com.ewarna.pdm.sessions.persistence.BasicQuery.getByFormula(BasicQuery.java:95)
at
com.ewarna.pdm.sessions.persistence.BasicQuery.getAll(BasicQuery.java:131)
at
com.ewarna.pdm.sessions.persistence.GenericEntityManager$7.execute(GenericEntityManager.java:305)
at
com.ewarna.pdm.sessions.persistence.GenericEntityManager.execute(GenericEntityManager.java:251)
... 18 moreYoucan no longer display a workbook. You receive an error message when opening: <Internal error>: 1201 document storage
Cause and prerequisites
In very rare cases, when you store a workbook, you might not be able to open it again.
Solution
Function module BDS_PHIOS_GET_RIGHT has to be changed so that the last available version of the Workbooks can be displayed. -
Data doesn't come up in SQL database
Hi,
I have been trying add data to my local .mdf database through C#. My code executes successfully but the data doesn't come up when I view the table data through Server Explorer. My database is not read-only and I have set it to never copy the database. Here
is my code:
SqlConnection con = new SqlConnection(global::Quizz.Properties.Settings.Default.QAConnectionString);
string sql = "INSERT INTO Old (Question, AnsOne, ansTwo, ansThree, Correct) VALUES (@Question, @AnsOne, @ansTwo, @ansThree, @Correct)";
SqlCommand sqlcmd = new SqlCommand(sql,con);
sqlcmd.Parameters.AddWithValue("@Question", questiontxtbox.Text.ToString());
sqlcmd.Parameters.AddWithValue("@AnsOne", ans1textbox.Text.ToString());
sqlcmd.Parameters.AddWithValue("@AnsTwo", ans2textbox.Text.ToString());
sqlcmd.Parameters.AddWithValue("@AnsThree", ans3textbox.Text.ToString());
sqlcmd.Parameters.AddWithValue("@Correct", selectedradio);
con.Open();
sqlcmd.ExecuteNonQuery();
MessageBox.Show("success!");
How do I solve this problem?If your result of "sqlcmd.ExecuteNonQuery();" >
0 without any exceptions, I think you should try to see whether your local db is copied again each time. I mean you are dealling with a copy type of db instead of real one.
If so, please:
1) Please change the property by switching to the db and change the "Copy To Local" to false.
2) Create an "App_Data" folder.
3) Change your db connection string to this following:
Server=.\SQLExpress;AttachDbFilename=|DataDirectory|\MyDataFile.mdf;Database=dbname;
Trusted_Connection=Yes;
For more about connection string, plz see: http://www.connectionstrings.com/sql-server/
ASP.NET Forum
Other Discussion Forums
FreeRice Donate
Issues to report
Free Tech Books Search and Download -
How could I choose some bytes from HEX string and then convert it to a decimal value?
Hi I am working with an OMRON E5EN temperature controller using VISA serial to get data, I send the Read from Variable Area command and get this string in hexa 0230 3130 3030 3030 3130 3130 3030 3030 3030 3030 3041 3203 71 or .01000001010000000000A2.q in ASCII this string means:
02 STX
3031 3030 Node and subadress
3030 End Code Normal Completion
3031 3031 Command Read from Variable Area
3030 3030 respt code Normal completion
3030 3030 3030 4132 Hexadecimal A2 = 162 (this is the temperature data that I want to show in decimal)
03 ETX
71 Block Check Character
I want to choose the eight bytes for the temperature data and convert it to a decimal number. I have seen the examples to convert a Hexa string to decimal but I do not know how to choose the specifics bytes that I need.
I have look for a driver but i didn´t find any. I am a beginner so please include especific topics for me to study in your answer.
Thanks
Carlos Fuentes Silva Queretaro MexicoIf the response always has the temperature starting with byte 15 and is always 8 bytes in length, you can use the String Subset function to get those bytes out of the string. Then use Hex String to Number to convert to a decimal number.
Well someone already beat me to the solution:
Message Edited by tbob on 01-04-2008 04:42 PM
- tbob
Inventor of the WORM Global
Attachments:
HexStr2Decimal.png 7 KB -
Insert date sent in flag email script
I need to insert the date sent into this flagged email script to make it more useful, just not sure how to do it:
set newline to ASCII character 12
set finalText to "EMAIL REMINDERS:" & newline
tell application "Mail"
set theMessages to every message in inbox whose flagged status is true
repeat with i from 1 to number of items in theMessages
set thisMessage to item i of theMessages
set fromMsg to (sender of thisMessage as string)
set subjMsg to (subject of thisMessage as string)
set finalText to finalText & "FLAG: " & word 1 of fromMsg & " : " & subjMsg & " : " & newline
end repeat
end tell
finalTextHi,
The E-mail template is actually works as an HTML or CSS page. You need to use the HTML/CSS formats to send these values in the format as you want. Use <tags> to do the formating of Email template.
Use function to store multiple values and thn use them into Email
I hope this will help.
Thanks~ Giriraj Singh Bhamu -
Is there any way to spy the data communicating between the GPIB and the PC.
HI
I have a device communicating with my PC using IEEE 488 GPIB card. Do we have any way to spy the data exchanged by the device and the PC running a different application.
I am trying to program an application that needs to gather data from a HP 54602A - 150 MHz - 4 Channel oscilloscope using a IEEE 488 add-on card. I am able to talk to the device and request the device number through MAX. I need to know the other commands to the oscilloscope. Can any one help me in this regard.
With Regards
S.GopalLaunch NI Spy (Start >> Programs >> National Instruments >> NI Spy). You may want to configure it to capture 64k of data instead of 64 bytes since the strings sent to the device may be larger than 64 bytes.
Start capturing with NI Spy and then run the application. All of the calls made to the device will be captured in NI Spy. You can then look at the data buffers to determine what strings are being sent to your device. -
How to see the data in data containers when working on Generic Sync ?
Hi All,
I am working on Mobile Sales For HandHeld Generic Sync based application. To check the data transafer from Mi Client > MI server> CRM backend, we are using Generic Sync Queue Monitor in NWA. But how to check the actual dara in data containers showed on the monitor? Any specific transaction ( e.g. merep_mon for smart sync) to chk the same?
Thanks & regards,
Rucha AtreHi,
This is a tedious process of viewing the data in the containers since there is no tool to monitor the same. The data sent from the client is stored MESYHEAD and MESYBODY. Once the entire processing is completed then the entries from this table is deleted. If the processing has failed or not taken place then the entries will in this table.
Data Containers will name value pairs with field name and data in the data field. This table will also contain data from smart sync applications.
Thanks..
Preetham S -
Saving the data from an interactive adobe form
Hi Gurus,
I want to know how to upload the data from an interactive form (i.e the data sent by a person via email or URL.It is in XML format) into the SAP database.
Thanks,
RajHi Vaibhav,
I have designed an the interactive form which works both online and offline.In offline scenario when i am uploading the form the data form fields which has cardinality 1:1 are being fetched but how wil i fetch the data for the node of cardinality 0:n. i have used the code :
node = document->find_from_name( name = 'attr' ).
attr = node->get_value( ).
attr is the attribute name of some node named node_info.
When i use this code it fetched only the first line of the table i.e only the first value.
How will i fetch the values for rest of the rows.Can u please guide me on this
will reward points for sure.
Thanks and Regards,
srividya. -
Stage tab delimited CSV file and load the data into a different table
Hi,
I pretty new to writing PL/SQL packages.
We are using Application express for our development. We get CSV files which is stored as a BLOB content in a table. I need to write a trigger that would get executed once the user the uploads the file and parse thru the Blob content and upload or stage the data in a different table.
I would like to see if there is any tutorial or article that could explain the above process with the example or sample code to do the same. Any help in this regard will be highly appreciated.Hi,
This is slightly unusual but at the same time easy to solve. You can read through a blob using the dbms_lob package, which is one of the Oracle supplied packages. This is presumably the bit you are missing, as once you know how you read a lob the rest is programming 101.
Alternatively, you could write the lob out to a file on the server using another built in package called utl_file. This file can be parsed using an appropriately defined external table. External tables are the easiest way of reading data from flat files, including csv.
I say unusual because why are you loading a csv file into a blob? A clob is almost understandable but if you can load into a column in a table why not skip this bit and just load the data as it comes in straight into the right table?
All of what I have described is documented functionality, assuming you are on 9i or greater. But you didn't provide a version so I can't provide a link to the documentation ;)
HTH
Chris -
How to edit the date in an event
Help please, I uploaded some pictures into iphoto (I'm new to it). However they were uploaded and dated in an event automatically as 2004 and they are supposed to be 2009. Does anyone know how to change the date for events manually? I cannot figure it out. Thanks!!!
Check your camera set up - the dates iPhoto use come from it
to correct dates select the photo(s) you want to correct and adjust the time and date - iphoto menu ==> adjust date and time
You may find the iPhoto tutorials worth watching - http://www.apple.com/findouthow/photos/ - as simple and intuitive as iPhoto is there is a learning curve and there are lots of features to learn
LN -
Date Sent not showing in Sent Mail
After a certain date, using Mail application, the Date (sent) is not showing in the header along with To & From & Subject. Why?
I have tried to get it to show using view prefs. Doesn't work.
I have changed to using a network time server. Doesn't work.
I've tried moving it to another folder. Doesn't work.
I need the date to show so when I print, I have proof of date and time sent...
Anyone?Not sure about the time stamp problem, but the missing "Sent" mails problem is not uncommon. This problem is one that a lot of people have and in my opinion, I think it's a problem with Apple's mail application, nothing at the user's end.
Does this happen only when you include an attachment or does that matter? Also, does it only happen when your outgoing message is delayed a bit? Check your junk/spam folder to see if your sent messages went in there.
This doesn't fix anything, but you might change your e-mail settings so that all new mails are automatically sent Bcc to yourself.
Sometimes the "missing" sent mails are not going in the right folder. I'm sure you probably already know, but in the left-hand column in MAIL, under Mailboxes, there is a second "sent" folder way at the bottom, depending on your other e-mail accounts, such as Yahoo or Gmail). Many people have discovered their missing "sent" e-mails in those.
It is a big hassle, for sure, and has been officially reported. Users with complaints are being told that Apple's Intrusion Detection and Prevention (IDP) systems block the connection from a user's e-mail client when it attempts to store outgoing e-mails, which contain attachments, to the users' sent folder.
This is supposedly due to the Mac OS/Mac Mail sending non-standard or erroneous commands to the server, emulating the activity which would be generated by an attacker attempting to abuse an exploit in the IMAP server. I doubt you are doing anything wrong, so it's just a matter of waiting for them to FIX this annoying issue.
Maybe you are looking for
-
Since this morning, every time I try to open an HTML message in Mail, it crashes. I don't have a problem with regular text e-mails, just HTML. I've repaired permissions, run Disk Utility and Disk Warrior, and I don't know how to proceed. Can anyone h
-
Message processing in AII (from XI)
Hi, we are in the process of connecting mySAP ERP ECC 5.0 with XI 3.0 and AII 2.1 but are running into some issues. 1. We are actually able to download a material with iDoc AIDMATMAS.MATMAS01 from mySAP ERP to XI. 2. We actually see in SXMB_MONI (in
-
My iPhone has been in Korea for more than 48 hours, has anyone else had this problem?
So I ordered and it said it shipped the next day, which is great. But ever since it's arrived in Korea it hasn't moved in over 48 hours. I thought this was odd so I did some research and I've seen other people have their iPhone arrive and depart Kore
-
Acer 8930G windows 7 Home Premium -HP x6000 Wireless Mouse driver unable to install successfully
I have an Acer 8930G notebook running on Windows 7 Home Premium, I recently purchased an HP Wireless x6000 Mouse , the blue tooth adapter works fine, mouse recognised OK but flickers about the screen, tried loading the correct drivers/software also t
-
hi everybody,please someone help me,i had a 3gs last year and i bought a 4,but itunes doesn't synch videos from photos file and it crashes,every time i try to synch photos it stacks when videos try to synch and crashes,what to do please?