Problem with rs232 and intern communication

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 2 and 3.

Moderators: Benj, Mods

Post Reply
Andi
Posts: 19
Joined: Thu Nov 29, 2007 12:08 pm
Contact:

Problem with rs232 and intern communication

Post by Andi »

hi all!
To make clear my problem, i will try to describe my current project:

I have 2 electronic devices which each is controlled by a pic. The first electronic circuit sends transmitts data via rs232 to a radio module. This modul sends the data to a 2nd radio module which receives the incoming data and transmitt it via rs232 to the 2nd electronic circuit. This circuit handles the incoming data and sends it back to the 1st electronic circuit.

I hope everybody is able to understand my description :)

Now, here is my question:

Is it possible to communicate between the two different source codes without a existing hardware connection?
Is it possible to use or to import/export variables from program x to program y?

If yes, how can i manage this?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post by Benj »

Hello Andi

As long as the radio connection is working correctly then you do not need a physical connection.

It is possible to pass variables by using the RS232. Eg send an instruction byte and then a data byte. The receiver would read instruction byte and then know what to do with the data byte.

Andi
Posts: 19
Joined: Thu Nov 29, 2007 12:08 pm
Contact:

Post by Andi »

Benj wrote:Hello Andi

As long as the radio connection is working correctly then you do not need a physical connection.

It is possible to pass variables by using the RS232. Eg send an instruction byte and then a data byte. The receiver would read instruction byte and then know what to do with the data byte.
thank you for your help so far!

But I dont have access to any hardware/radio modules or stuff like that at the moment... I just developed the software so far...
So is it possible to import a variable called "x", defined in sourcecode "A" to sourcecode "B" and work with variable "x" in sourcecode "B"?

As i said, i dont have any hardware atm, i just have the software (Flowcode) ;) and i whould like to test if the software works correctly
(the data exchange between sourcecode "A" and sourcecode "B" )

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Post by Benj »

Hello Andi

If you are going to use the RS232 pins for the radio signal then you might aswell use this for the testing also. Simply connect the Rx pin to the remote TX pin and visa versa.

Now that you have a connection you can use my before mentioned method of sending a command and then some data.

Eg

Transmitter would
send out 128
then send out x variable

Then receiver would
Wait for 128
Then read next byte into X variable.

Post Reply