Sciencemadness Discussion Board
Not logged in [Login ]
Go To Bottom

Printable Version  
 Pages:  1  
Author: Subject: Genesys 2 or 5 Software
ScienceHideout
Hazard to Others
***




Posts: 391
Registered: 12-3-2011
Location: In the Source
Member Is Offline

Mood: High Spin

[*] posted on 1-4-2014 at 14:23
Genesys 2 or 5 Software


As you may or may not know, I got a Genesys 5 spectrophotometer with a scanning ability and fixed it up to be really nice. Finally, I got it to power up and work perfectly.

Lately I have really been wanting to connect it to a computer via RS-232-C, and I have the appropriate cord. What I DON'T have is the software, and I don't even know what I need... perhaps something like WinSpec. If anyone can point me in the right direction to get spectrophotometer software, preferably free, that would be greatly appreciated.

Just some info about the connection:
9 pins:
-1-Data Carrier Detect
-2-Receive Data
-3-Transmit Data
-4-Data terminal ready
-5-Signal Ground
-6-Data Set Ready
-7-Request to Send
-8-Clear to Send
-9-Ring Indicator
DCE Format
Baud Rate: 300, 1200, 2400, 4800, or 9600 (selectable)
Transmission mode: Full duplex
8 data bits with even, odd, or no parity (selectable)

The following page gives a list of 'commands' that can be typed in, I am assuming to the computer, and it will perform that function.

Thanks in advance!
-Dean




hey, if you are reading this, I can't U2U, but you are always welcome to send me an email!


View user's profile Visit user's homepage View All Posts By User
The Volatile Chemist
International Hazard
*****




Posts: 1981
Registered: 22-3-2014
Location: 'Stil' in the lab...
Member Is Offline

Mood: Copious

[*] posted on 3-4-2014 at 08:26


What Page (For the commands)? But If the commands are just text, it should be easy to access. Open up a serial terminal on your computer and try typing one in. If you give me a list of the commands, I have enough free time to make a program that does them for you (With a GUI), if you'd like...

[Edited on 4-3-2014 by The Volatile Chemist]




View user's profile Visit user's homepage View All Posts By User
ScienceHideout
Hazard to Others
***




Posts: 391
Registered: 12-3-2011
Location: In the Source
Member Is Offline

Mood: High Spin

[*] posted on 3-4-2014 at 11:54


Volatile, you are truly awesome and I would love it so much if you would be kind enough to do that. My computer knowledge is somewhat... erm... lacking, so I commend you :)

http://www.artisantg.com/info/PDF__5370656374726F6E69635F476...

On page 102 of the above manual it discusses all about the RS-232-C, and on the following page it gives the commands.

Once again, thank you very much!
Dean




hey, if you are reading this, I can't U2U, but you are always welcome to send me an email!


View user's profile Visit user's homepage View All Posts By User
The Volatile Chemist
International Hazard
*****




Posts: 1981
Registered: 22-3-2014
Location: 'Stil' in the lab...
Member Is Offline

Mood: Copious

[*] posted on 4-4-2014 at 08:21


Quote: Originally posted by ScienceHideout  
Volatile, you are truly awesome and I would love it so much if you would be kind enough to do that. My computer knowledge is somewhat... erm... lacking, so I commend you :)

http://www.artisantg.com/info/PDF__5370656374726F6E69635F476...

On page 102 of the above manual it discusses all about the RS-232-C, and on the following page it gives the commands.

Once again, thank you very much!
Dean


Glad to be of assistance! It made my day that the very thing you needed was one of the only things I knew how to do well! :) Looking into it, I'll be able to give you a test program in 5 hours (School first...), Then maybe a real program within 3 days. Good? Just checking, you run windows, mac, or linux-based???? ( may not be able to do it on the second two....)




View user's profile Visit user's homepage View All Posts By User
The Volatile Chemist
International Hazard
*****




Posts: 1981
Registered: 22-3-2014
Location: 'Stil' in the lab...
Member Is Offline

Mood: Copious

[*] posted on 4-4-2014 at 12:30


So, run the below program, with your spectrophotometer on serial mode, even parity, and 9600 baud. When the program runs, a tiny message box will pop up. Click the test button. If all works well, a message "Hello World!" Will be displayed on your spectrophotometer. If it doesn't work, don't worry, I probably just mixed something up. The program runs on windows only. If it does work, be sure to tell me! The purpose of this is to test my system of communication that I used with the Spectrophotometer.
Hope it works!
Nathan

PS: I'll soon be getting on the real program, just want to make sure it works first. Give me a list of things you would like to be able to do with your spectrophotometer through this program.

Sorry, forgot the program! :
http://ptp.x10.mx/test.exe

[Edited on 4-4-2014 by The Volatile Chemist]




View user's profile Visit user's homepage View All Posts By User
ScienceHideout
Hazard to Others
***




Posts: 391
Registered: 12-3-2011
Location: In the Source
Member Is Offline

Mood: High Spin

[*] posted on 4-4-2014 at 14:40


Thank you, I will test this as soon as I get a chance, probably later tonight :) I will let you know ASAP if this works.



hey, if you are reading this, I can't U2U, but you are always welcome to send me an email!


View user's profile Visit user's homepage View All Posts By User
ScienceHideout
Hazard to Others
***




Posts: 391
Registered: 12-3-2011
Location: In the Source
Member Is Offline

Mood: High Spin

[*] posted on 4-4-2014 at 15:08


Okay, it looks like it is all good and the Hello World message comes up :) Thank you soo much!

Here is a list of commands that I would like the machine to perform:

AUTOZERO
AUTOZERO absorbance
BASELINE
CELL cell number
CELL +
CELL -
DATAMODE ABS
DATAMODE TRANS
DEUTERIUM OFF
DEUTERIUM ON
EXIT
PRINT
SCAN resolution start wavelength stop wavelength
WAVELENGTH wavelength

Now, I am not sure if this is possible, but can the machine take the data from a scan and send it directly to the computer instead of on the soft card in the machine?

Thank you again, very much :D
Dean

[Edited on 4-4-2014 by ScienceHideout]

[Edited on 4-4-2014 by ScienceHideout]




hey, if you are reading this, I can't U2U, but you are always welcome to send me an email!


View user's profile Visit user's homepage View All Posts By User
The Volatile Chemist
International Hazard
*****




Posts: 1981
Registered: 22-3-2014
Location: 'Stil' in the lab...
Member Is Offline

Mood: Copious

[*] posted on 5-4-2014 at 11:19


Quote: Originally posted by ScienceHideout  
Okay, it looks like it is all good and the Hello World message comes up :) Thank you soo much!

Here is a list of commands that I would like the machine to perform:

AUTOZERO
AUTOZERO absorbance
BASELINE
CELL cell number
CELL +
CELL -
DATAMODE ABS
DATAMODE TRANS
DEUTERIUM OFF
DEUTERIUM ON
EXIT
PRINT
SCAN resolution start wavelength stop wavelength
WAVELENGTH wavelength

Now, I am not sure if this is possible, but can the machine take the data from a scan and send it directly to the computer instead of on the soft card in the machine?

Thank you again, very much :D
Dean

[Edited on 4-4-2014 by ScienceHideout]

[Edited on 4-4-2014 by ScienceHideout]

It worked? That's great! I'll get on the program. I can make functions for all of those commands (And probably throw in a few more. For example, you said something to the means of you having to work on this before it turned on? I'll make it run a diagnostic check to :) )

In answer to your question, is a "scan" a picture, or a number (Data). There seems to be a command (DATA) that retrieves data at a wavelength. I could make a program that changes the wavelength and reads data for a cell, generating a list of values for many wavelengths. It would output CSV (Comma separated Values) files, which could be inputted into Excel (Or other spreadsheet program) to make a graph of how well a substance absorbs light at certain wavelengths. Is that what you were talking about?




View user's profile Visit user's homepage View All Posts By User
ScienceHideout
Hazard to Others
***




Posts: 391
Registered: 12-3-2011
Location: In the Source
Member Is Offline

Mood: High Spin

[*] posted on 5-4-2014 at 11:59


Yes, that sounds amazing! Thank you again so much!



hey, if you are reading this, I can't U2U, but you are always welcome to send me an email!


View user's profile Visit user's homepage View All Posts By User
The Volatile Chemist
International Hazard
*****




Posts: 1981
Registered: 22-3-2014
Location: 'Stil' in the lab...
Member Is Offline

Mood: Copious

[*] posted on 5-4-2014 at 12:47


Quote: Originally posted by ScienceHideout  
Yes, that sounds amazing! Thank you again so much!

Glad to hear it! was working on the actual program when you posted the last reply. I've implemented Autozero, Autozero <absorbance>, Baseline, and baseline with settings (choose the start & stop wavelengths, and the wavelength increment, this function was built in, I'll make another one for generating data for graphs.
Glad to be of help! (It's fun for me too! :) )
Nathan

Tomorrow, or later today I'll give you a copy of what I've done so far (Not much, but it should at least be helpful)




View user's profile Visit user's homepage View All Posts By User
The Volatile Chemist
International Hazard
*****




Posts: 1981
Registered: 22-3-2014
Location: 'Stil' in the lab...
Member Is Offline

Mood: Copious

[*] posted on 5-4-2014 at 15:26


Quote: Originally posted by ScienceHideout  
Yes, that sounds amazing! Thank you again so much!

First version finished. Only has a few of the features you wanted, but I thought I'd give you something of my day's work. I'll add the rest later (Tomorrow). You can get it here:
http://ptp.x10.mx/SpecControl.exe

Features (So far)
Scan- Type in resolution, start, and stop values in 3 text boxes, hit 'scan' button.
Moving between cells- Hit the up and down buttons next to the textboxes to move between cells. Hit the 'X' to move to the cell in the number box next to it. Hit the Baseline button to perform the baseline function.
Port Number- Select the COM port in the upper right corner, change is instant.
Adjustment > Set Zero Value - Sets the last read value as zero absorbance
Adjustment > Set Correct Value - Sets last read value to it's correct value, as input-ted by you
The wavelength function under Adjustment doesn't work yet...

Glad to help!
Nathan




View user's profile Visit user's homepage View All Posts By User
ScienceHideout
Hazard to Others
***




Posts: 391
Registered: 12-3-2011
Location: In the Source
Member Is Offline

Mood: High Spin

[*] posted on 5-4-2014 at 18:03


Okay, so I just went down in the lab and tested the machine... I connected it, turned the RS-232 on... everything looked good. Then I pressed a button on the program and the machine said there was an 'Serial Communication Error.' I tried a few different buttons, tried typing text in the message box, nothing worked. This puzzled me, so I opened up the 'Hello World!' program that you made earlier, and I can still get the message to come up fine on the spec... however, if you leave it to idle with that message for a few minutes, the error comes up. This really baffles me... Looked in the troubleshooting section of the manual and It doesn't even list this code. I honestly have no idea what parity is, but could that affect it? I know that most programs have no parity... Hmmm... Do you think that changing it to another 'COM' port would do anything? I can go into my device manager and change it to COM 3 or whatever...

Anyways, thanks for what you have done so far! I can't wait to perform scans and stuff!




hey, if you are reading this, I can't U2U, but you are always welcome to send me an email!


View user's profile Visit user's homepage View All Posts By User
The Volatile Chemist
International Hazard
*****




Posts: 1981
Registered: 22-3-2014
Location: 'Stil' in the lab...
Member Is Offline

Mood: Copious

[*] posted on 5-4-2014 at 19:50


Quote: Originally posted by ScienceHideout  
Okay, so I just went down in the lab and tested the machine... I connected it, turned the RS-232 on... everything looked good. Then I pressed a button on the program and the machine said there was an 'Serial Communication Error.' I tried a few different buttons, tried typing text in the message box, nothing worked. This puzzled me, so I opened up the 'Hello World!' program that you made earlier, and I can still get the message to come up fine on the spec... however, if you leave it to idle with that message for a few minutes, the error comes up. This really baffles me... Looked in the troubleshooting section of the manual and It doesn't even list this code. I honestly have no idea what parity is, but could that affect it? I know that most programs have no parity... Hmmm... Do you think that changing it to another 'COM' port would do anything? I can go into my device manager and change it to COM 3 or whatever...

Anyways, thanks for what you have done so far! I can't wait to perform scans and stuff!


Well, that at least will be easy to solve. What commands did you try running? Did you set your machine to 9600 Baud, even parity? I'll try a few edits to the transmit code, change it back to how it was. This should fix it. If it doesn't, it's likely it has a problem with a command or commands. which did you try?
Expect an updated file afternoon tomorrow, which will hopefully fix the problem you described.
Thanks for the info!
Nathan




View user's profile Visit user's homepage View All Posts By User
The Volatile Chemist
International Hazard
*****




Posts: 1981
Registered: 22-3-2014
Location: 'Stil' in the lab...
Member Is Offline

Mood: Copious

[*] posted on 6-4-2014 at 10:53


Alright. I uploaded a hopefully better program.
http://ptp.x10.mx/SpecControl2.exe
Please do the following test (It now runs at these following specs.) Set your Spectrophotometer (Sheesh, long word...) to 4800 Baud, with EVEN parity. Only open one program at a time which accesses the COM port that the machine is using. Set the COM port in the upper right corner to whatever port you are using. Press Communication >> Screen Message, and type in something. If an error comes up then, restart everything. If an error comes up when you start the program.... Tell me. Next (If it doesn't error on start), press the 'Up' arrow button. This SHOULD move up one cell. Tell me what happens.
Thanks!
Nathan

It's possible you asked the machine to do something it couldn't. To run a scan, you must type reasonable numbers into the resoulution, start (Minimum), and stop (Maximum) text boxes.

[Edited on 4-6-2014 by The Volatile Chemist]




View user's profile Visit user's homepage View All Posts By User
ScienceHideout
Hazard to Others
***




Posts: 391
Registered: 12-3-2011
Location: In the Source
Member Is Offline

Mood: High Spin

[*] posted on 6-4-2014 at 18:50


Okay, I changed the baud rate, made sure the parity was even, com 1, etc... Typed in something, and I still got the same error on the machine. I reset the machine and everything, and I tried to press other buttons thinking 'maybe it is only the message command that is corrupt." I pressed the button to move the sample cell, still, the error came up :(



hey, if you are reading this, I can't U2U, but you are always welcome to send me an email!


View user's profile Visit user's homepage View All Posts By User
The Volatile Chemist
International Hazard
*****




Posts: 1981
Registered: 22-3-2014
Location: 'Stil' in the lab...
Member Is Offline

Mood: Copious

[*] posted on 7-4-2014 at 08:19


Slashed this first part....

Note: You have to run a baseline before running a scan no matter what, probably should have read more...

[Edited on 4-7-2014 by The Volatile Chemist]
Edit: PROBLEM-Solved.... I figured out the command terminator was a CR.... I was using CRLF!!!! Wohoo! I'll implement it tonight!

[Edited on 4-7-2014 by The Volatile Chemist]




OK, This should be fixed. Go to your RS-232 C settings. Keep it at even parity, 4800 baud, etc. One thing, check your settings for RS-232C TERMINATOR: which should be CR right now. If not, tell me, but try to run this first:
http:/ptp.x10.mx/SpecControl3.exe
It should work, as I saw an error, I had used the wrong line terminator! :)

[Edited on 4-7-2014 by The Volatile Chemist]

[Edited on 4-7-2014 by The Volatile Chemist]




View user's profile Visit user's homepage View All Posts By User
ScienceHideout
Hazard to Others
***




Posts: 391
Registered: 12-3-2011
Location: In the Source
Member Is Offline

Mood: High Spin

[*] posted on 7-4-2014 at 15:03


Unfortunately it doesn't seem like that was the problem :( I can try the 2nd edition again and see if I can change the machine to CLRF, otherwise, I have no clue what the issue may be. Is the program running 8 data bits?



hey, if you are reading this, I can't U2U, but you are always welcome to send me an email!


View user's profile Visit user's homepage View All Posts By User
The Volatile Chemist
International Hazard
*****




Posts: 1981
Registered: 22-3-2014
Location: 'Stil' in the lab...
Member Is Offline

Mood: Copious

[*] posted on 8-4-2014 at 08:23


Quote: Originally posted by ScienceHideout  
Unfortunately it doesn't seem like that was the problem :( I can try the 2nd edition again and see if I can change the machine to CLRF, otherwise, I have no clue what the issue may be. Is the program running 8 data bits?

I think so.... Did you try the thing you proposed above? Running version 2 with CRLF? That may work! I'll look for other problems in it tonight. If the CRLF thing doesn't work, change it back to CR, and I'll make another one tonight. Actually, I'll make a few. Tell me if any of them work. I'll post them as a second post to this one.
Sorry about how it's going so far...
Nathan




View user's profile Visit user's homepage View All Posts By User
The Volatile Chemist
International Hazard
*****




Posts: 1981
Registered: 22-3-2014
Location: 'Stil' in the lab...
Member Is Offline

Mood: Copious

[*] posted on 8-4-2014 at 11:39


Try This at CR, 4800 Baud, Even parity, 8 bits data:
http://ptp.x10.mx/SpecControl.exe




View user's profile Visit user's homepage View All Posts By User
aga
Forum Drunkard
*****




Posts: 7030
Registered: 25-3-2014
Member Is Offline


[*] posted on 8-4-2014 at 13:38


Hi from an Ancient.

RS232 is generally a Bitch unless all the parameters are known.

First off, what cable do you have ?

Second, is there any Setup that you can do on the machine, such as DIP switches etc ?

If you're on windows, try using hypertrm.exe and see if the machine talks nicely to you.

If you do not have hypertrm.exe i'll send it to you.

[Edited on 8-4-2014 by aga]
View user's profile View All Posts By User
aga
Forum Drunkard
*****




Posts: 7030
Registered: 25-3-2014
Member Is Offline


[*] posted on 8-4-2014 at 13:50


Sorry. I missed the 'It worked' statement.

Most likely you are hitting a buffer overflow error - the machine's RS232 buffer cannot keep up with the rate the PC sends data (not the baud rate : the rate at which the PC sends characters at whatever baud rate).

You can work around that by introducing a delay in software between sending characters (depends on PC speed) or, much better, use the CTS/RTS/DTR lines of the RS232 interface.

Another method is XON/XOFF which is much the same, but without the extra wires.

Both methods prevent the sender (the PC) sending anything if the machine is busy/unable to accept more characters.

Seeing as the machine and the PC were OK with short messages, it is likely that this is the problem.

[Edited on 8-4-2014 by aga]
View user's profile View All Posts By User
The Volatile Chemist
International Hazard
*****




Posts: 1981
Registered: 22-3-2014
Location: 'Stil' in the lab...
Member Is Offline

Mood: Copious

[*] posted on 9-4-2014 at 11:04


Quote: Originally posted by aga  
Sorry. I missed the 'It worked' statement.

Most likely you are hitting a buffer overflow error - the machine's RS232 buffer cannot keep up with the rate the PC sends data (not the baud rate : the rate at which the PC sends characters at whatever baud rate).

You can work around that by introducing a delay in software between sending characters (depends on PC speed) or, much better, use the CTS/RTS/DTR lines of the RS232 interface.

Another method is XON/XOFF which is much the same, but without the extra wires.

Both methods prevent the sender (the PC) sending anything if the machine is busy/unable to accept more characters.

Seeing as the machine and the PC were OK with short messages, it is likely that this is the problem.

[Edited on 8-4-2014 by aga]

Thanks! ScienceHidout, did you try it??? (The most recent link?)




View user's profile Visit user's homepage View All Posts By User
aga
Forum Drunkard
*****




Posts: 7030
Registered: 25-3-2014
Member Is Offline


[*] posted on 9-4-2014 at 12:22


Just for completeness, the CTS/RTS/DTR pins on an RS232 connection are as follows :-

CTS = Clear To Send - a signal saying 'you may send me some data'
RTS = Ready To Send - a signal saying 'i have some data is to send you'
DTR = Data Terminal Ready - a signal saying that a device is ready to accept data, dependent on CTS.

The C in RS232C just means that the RS232 signals run at 12 volts.
View user's profile View All Posts By User
ScienceHideout
Hazard to Others
***




Posts: 391
Registered: 12-3-2011
Location: In the Source
Member Is Offline

Mood: High Spin

[*] posted on 9-4-2014 at 12:55


Unfortunately, the newest program didn't work nor did changing the termination thing on the previous ones... So far the best working one was the 'hello world' one :P



hey, if you are reading this, I can't U2U, but you are always welcome to send me an email!


View user's profile Visit user's homepage View All Posts By User
The Volatile Chemist
International Hazard
*****




Posts: 1981
Registered: 22-3-2014
Location: 'Stil' in the lab...
Member Is Offline

Mood: Copious

[*] posted on 9-4-2014 at 13:17


Quote: Originally posted by ScienceHideout  
Unfortunately, the newest program didn't work nor did changing the termination thing on the previous ones... So far the best working one was the 'hello world' one :P

Looking into it...




View user's profile Visit user's homepage View All Posts By User
 Pages:  1  

  Go To Top