d_nikolaos Posted October 14, 2008 Report Posted October 14, 2008 Hi, I want to join 2 bytes that I take them from the serial port. Is that possible? Except for that, I want to have somethink like start and stop. I want to sent from a PIC through the RS232 some numbers in dec form like ('#19*') # = start byte * = stop byte Is that possible? Quote
jdunham Posted October 14, 2008 Report Posted October 14, 2008 QUOTE (d_nikolaos @ Oct 13 2008, 07:51 AM) Hi,I want to join 2 bytes that I take them from the serial port. Is that possible? Except for that, I want to have somethink like start and stop. I want to sent from a PIC through the RS232 some numbers in dec form like ('#19*') # = start byte * = stop byte Is that possible? Everything is possible, but what kind of inputs and outputs are you looking for? Check out "Concatenate String", "Format Into String", the String/Number Conversion palette, and possibly the Data Manipulation palette. It would also help if you post some code (or a block diagram screen capture) of what you are trying to do. Quote
d_nikolaos Posted October 15, 2008 Author Report Posted October 15, 2008 My input will be 12 bits. But with the RS232 protocol I have to split these 12 bits to 8 and 4 bits. So finaly my input will be 8bits the first time and 4 bits the second. Then I want to join them with some way and then I will convert this number to a decemical form. So my input is somethink like this 00001101 and 0010 and my output 525. Quote
Mellroth Posted October 15, 2008 Report Posted October 15, 2008 QUOTE (d_nikolaos @ Oct 14 2008, 08:32 AM) My input will be 12 bits. But with the RS232 protocol I have to split these 12 bits to 8 and 4 bits.So finaly my input will be 8bits the first time and 4 bits the second... As jdunham said, it would really help if you could post some code. To combine two 8 bit numbers into one 16bit number, you can use the "Join Numbers" primitive in LabVIEW. I don't know if you transfer the data in network byte order, or intel byte order, but you can handle either case with the "Join Numbers" /J Quote
d_nikolaos Posted October 15, 2008 Author Report Posted October 15, 2008 The "Join numbers" function is a good solution but my question know is how I can make this function to understand that the first 8 bits is hi and the other 8 bits is lo. Second how I can convert this 16bit to number. Quote
Mellroth Posted October 15, 2008 Report Posted October 15, 2008 QUOTE (d_nikolaos @ Oct 14 2008, 10:13 AM) ...how I can make this function to understand that the first 8 bits is hi and the other 8 bits is lo.Second how I can convert this 16bit to number... The output is a 16bit number. To change the order of the Hi and Low bytes, just wire the node in different order. Use the LabVIEW contextual help to display how a function is used. /J Quote
d_nikolaos Posted October 15, 2008 Author Report Posted October 15, 2008 Can you tell me what is the function before the join numbers? Quote
PJM_labview Posted October 15, 2008 Report Posted October 15, 2008 QUOTE (d_nikolaos @ Oct 14 2008, 10:53 AM) Can you tell me what is the function before the join numbers? Decimate 1D array PJM Quote
d_nikolaos Posted October 15, 2008 Author Report Posted October 15, 2008 Thank all of you for your help. I will give it a tray..... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.