Show Posts
Pages: [1] 2
1  Using Arduino / Project Guidance / Re: Precision check weigher on: January 29, 2013, 07:01:15 am
Yes, I don't receive nothing from the weigher.... how I ca tobe sure that my code works well? And why mi weigher doesn't reply to me?
Are there some error in the code?

thanks
Fabio
2  Using Arduino / Project Guidance / Re: Precision check weigher on: January 27, 2013, 05:51:01 am
Hi Peter

I don't understand exacltly your reply, I connect my RS232 shield to my USB serial converter for monitor the signal that my Arduino output

in this image you can see the connection
http://i46.tinypic.com/2d801w.jpg

In this way I can to monitor what my shied output, or not. Is this system wrong?
How I can to be sure that my shield work well?
Fabio
3  Using Arduino / Project Guidance / Re: Precision check weigher on: January 25, 2013, 08:36:50 am
@PeterH

Your trace code doesn't seem to print out the received characters properly, perhaps because SoftwareSerial returns an integer and you are using the String append operator to add that to a string so they are getting decimalised......

Yes, of cource I'll can trace better after, now I'm interested only to show that my Arduino code work well and trace something received....
I'm interested to this because I immagine that if it work with my Software serial it'll work also with my weigher, but with the weigher I haven't trace nothing....  smiley-confuse

You don't say what happens in the other scenario when you connect the SoftwareSerial to RS232-to-TTL to the weigher.

Wat do you mean? I can connect my software serial (with my USB to Serial converter) only to the weigher serial or to the RS232 Arduino shield..... what do you mean with connect the SoftwareSerial to RS232-to-TTL to the weigher

Have you tried crossing the SoftwareSerial Tx/Rx lines over?

I have tryed to chage my cable from pin 7 to 8 but and also in the code... but never change.
In my actually configuration pin 8 RX and pin 7 TX in this way when I connect the arduino with the RS232 shield to the USB Serial converter and I monitor the signal the HEX character sended are correct, is for this that I think this configuration work well....

I hope to be more clear now?

Fabio
4  Using Arduino / Project Guidance / Re: Precision check weigher on: January 24, 2013, 02:23:16 pm
I try to explain another time whta I'll try to do:
My target is read a weigth from My Weigher that have a serial port.

For understand what my serial shield write and read I have used a USB-Serial converter and I monitor It with a serial port monitor software.



If I connect my Serial port monitor software (COM4) directly to the weigher and I send the right HEX command #01 #73 I receive from the weigher the right wheight



now with my Arduino I try to replicate the same command for obtain the weight

Code:
#include <SoftwareSerial.h>
SoftwareSerial Mx3232Serial(7, 8);
String Buffer; unsigned long T;
void setup()  {
  Mx3232Serial.begin(9600);
  Serial.begin(9600);
}
 
void loop() {
Buffer = ""; T = millis();
Serial.print("B ");
Mx3232Serial.write(0x01);
Mx3232Serial.write(0x73);
//Mx3232Serial.write(0x0D);

  while (millis() - T < 10)  {         // read all the chars on the serial
    Serial.print("D1");
    while (Mx3232Serial.available() > 0) {
      Buffer += (Mx3232Serial.read());
      Serial.print("Dentro");
    }
  }
  if (Buffer.length() > 0) {           // transmit to Serial Monitor        
    Serial.print("Trovato: "); Serial.print(Buffer);
  }

delay(5000);
Serial.print("E"); Serial.print(Buffer); Serial.print("\r\n");
}


Now If I connect the Arduino Serial to the weigher I doesen't receive nothing.

For verify that my code work I have connected the arduino COM3 to the Usb Serial Converter COM4 and use my serial port monito for show what My arduino send



If i send someting on the port my arduino find it....

Now the question is why I can't receive anithing from my wheigher?

I hope to be clear
thanks a lot for your support!
Fabio
5  Using Arduino / Project Guidance / Re: Precision check weigher on: January 14, 2013, 10:00:24 am
Can you help me how I can be sure that my Arduino read correctly on his serial port?
I connect the arduino to the weigher but i doesn't receive anithing!
thanks
Fabio
6  Using Arduino / Programming Questions / Re: Read and send HEX sting by serial on: January 14, 2013, 09:59:57 am
Can you help me how I can be sure that my Arduino read correctly on his serial port?
I connect the arduino to the weigher but i doesn't receive anithing!
thanks
Fabio
7  Using Arduino / Project Guidance / Re: Precision check weigher on: January 10, 2013, 12:30:58 pm
I have try to connect another time the serial output of the pc to the Arduino serial, and apparently it work



here you can see the result by sending the aaaa (string) and the 01 73 (hex) with a serial port monitor
the Arduino echo serial show aaaa and "space" + s exactly the encoding of the HEX value in string
...
and now??? why my weigher don't make me and echo on the Arduino monitor?  smiley-cry smiley-cry smiley-cry smiley-cry
thanks for your support
Fabio
8  Using Arduino / Programming Questions / Re: Read and send HEX sting by serial on: January 10, 2013, 12:29:19 pm
Made and apparently work



here you can see the result by sending the aaaa (string) and the 01 73 (hex) with a serial port monitor
the Arduino echo serial show aaaa and "space" + s exactly the encoding of the HEX value in string
...
and now??? why my weigher don't make me and echo on the Arduino monitor?  smiley-cry smiley-cry smiley-cry smiley-cry
thanks for your support
Fabio
9  Using Arduino / Programming Questions / Re: Read and send HEX sting by serial on: January 05, 2013, 02:27:12 pm
Have you tried connecting your rs232 shield to the rs232 on your PC. Then do a simple sketch to echo your arduino serial connection over rs232 to check that it's connected up properly. This is to make sure its all connected up properly

Yes! I hav made and it work well (look the latest snapshot), now the problem is when I attache the arduino to the weigher, I doesn't receive any reply!

thanks for your support!
Fabio
10  Using Arduino / Project Guidance / Re: Precision check weigher on: January 05, 2013, 02:22:41 pm
Quote
but if I try with a serial port monitor to send 01 73 HEX it reply me!
Which Serial Port Monitor? Post a screen shot of before the send and after the send (the reply).

It's possible that your understanding of what the scale expects could be all wrong. Perhaps it IS expecting "01" and "73", not 0x01 and 0x73.

I have tried wit more and with all work well. Now I use a demo version of Eltima software Serial port monitor 4.0, here you can see a screenshot where with the Serial Port Monitor software I send a string to the Arduino and you can see the string in the Arduino serial Monitor.

After this I think that Arduino and RS232 shield are right connected!

I think that it ll be a problem in the sending or in the reception of the string

thanks for your support
Fabio
11  Using Arduino / Programming Questions / Re: Read and send HEX sting by serial on: January 05, 2013, 02:15:07 pm
Quote
The weigher work correctly connected directly to my pc!

So is your pc serial port TTL or rs232?

RS 232, is a standard USB port with a converter USB to RS232

Fabio
12  Using Arduino / Programming Questions / Re: Read and send HEX sting by serial on: January 05, 2013, 11:31:34 am
The weigher work correctly connected directly to my pc!
The weigher work correctly if I sebd the HEX command by a Port monitor.
And If I try to montor the ARDUINO by the Port monitor software i show the right command, If with my port monitor software I try to send a string my Arduino Monito show this string

I think that my arduino monitor read correclty or not?
thanks
Fabio
13  Using Arduino / Project Guidance / Re: Precision check weigher on: January 05, 2013, 11:15:24 am
OH yes, but unfurtunately it don't work  smiley-cry smiley-cry smiley-cry smiley-cry

Code:
Mx3232Serial.write(0x01);
Mx3232Serial.write(0x73);
Mx3232Serial.println(""); // carriage return

have you another idea? my weigher don't reply me, but if I try with a serial port monitor to send 01 73 HEX it reply me!

thanks
Fabio
14  Using Arduino / Programming Questions / Re: Read and send HEX sting by serial on: January 05, 2013, 11:10:40 am
 smiley-cry smiley-cry smiley-cry
Oh my good tried more and more time, but never.
I have no reply by the weigher.

what do you think is possible to make for a different carriage return?

Fabio
15  Using Arduino / Project Guidance / Re: Precision check weigher on: January 05, 2013, 08:05:10 am
Hi Pauls
tryed also with

Code:
Mx3232Serial.write(0x01,HEX);
Mx3232Serial.write(0x73,HEX);

But doesn't work.
Is there a way for send all the 2 commands in one way, or it's correct in this way?
thanks
Fabio
Pages: [1] 2