From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Picaxe to LabVIEW

Hello,

 

I am using the "Basic Serial Write and Read.vi" example in LabVIEW 8.6. I can send information from the PICAXE 08M micro to LabVIEW via the serial cable. However I want to store the information somewhere to be manipulated at a later time.

 

The LabVIEW example deletes the information after a few seconds. How do I store stuff?

 

Cheers

0 Kudos
Message 1 of 9
(4,162 Views)
What information is this that you want to "store"? Are we talking numbers? Have you looked at the File I/O functions?
0 Kudos
Message 2 of 9
(4,148 Views)

Hello,

 

I'm sending a "string". I've solved the problem by looking at the advanced example in the LabView files. Using the "decimal string to number" function I was able to take the data that I needed and do my calculations.

 

Thank you for the interest.

 

K

0 Kudos
Message 3 of 9
(4,141 Views)

Hello,

 

OK, so I got serial read and write to work, but not together. I am sending ASCII "GO" to the PICAXE chip. After some calculations on the PICAXE chip I want the information to be read.

 

The Problem:

Both read and write work, but not at the same time. It seems that I can Write "GO" but as soon as I click the READ button the Write function stops working and no information is Read.

 

Any ideas?

 

Cheers

 

K

0 Kudos
Message 4 of 9
(4,112 Views)
Are you still using the "Basic Serial Write and Read" example? I ask because that example doesn't have a "Read" button. There's a toggle switch that you can set to True so that when you run the VI it will perform a read after it does the write. If you're not using that example, then please post the VI that you're using.
0 Kudos
Message 5 of 9
(4,102 Views)

Hello,

 

I realise now, that the PICAXE 08M does not support duplex serial communication. For that reason I have made this code which Writes something, then resets the current COMPORT so that the READ function can be used.

 

here is my code.

 

If you see any improvements let me know. Thanks.

0 Kudos
Message 6 of 9
(4,049 Views)

Kamilan wrote:
 

I realise now, that the PICAXE 08M does not support duplex serial communication.


I have no idea what this has to do with anything. Full duplex is when you have separate pins for transmit/receive. Half-duplex is when you have the same pin for transmit/receive.

 

As for your code: I don't understand why you have inner loops for the write and read. Are you trying to continuously send out the command if you get an error? Why? What makes you think you won't have a serial port error again in the next iteration? 

0 Kudos
Message 7 of 9
(4,042 Views)

Kamilan, Please don't start new threads with the same question.

 

The thread has now moved to here.

0 Kudos
Message 8 of 9
(4,038 Views)

Hello, I was just following the example. Thank you for pointing that out. I have removed the while loops. The code runs alot better now.

 

Here it is.

0 Kudos
Message 9 of 9
(4,035 Views)