03-07-2011 03:16 PM
The structure for your hotplate project needs a lot of work.
Use subVIs and when you do use subVIs, make sure to give them meaningful icons.
Any for loop with only a single iteration doesn't need to be there.
Add a 100 ms wait to your first while loop. As it stands, it will consume 100% of the CPU while it polls the start button.
Don't do = comparisons for floating point numbers.
What's the model number for the hotplate? I'm guessing there may be an issue with the timing or commandset.
03-07-2011 03:22 PM
the hotplate is made by SCILOGEX and is model MS-H-PRO
03-07-2011 07:14 PM
Do you have a commandset manual for the MS-H-PRO?
All I could find on the internet is a proprietary RS-232 interface.
03-08-2011 01:16 PM
there is a commandset but it isn't available online, command and data sned in a speed of 9600 BPS and N, 8, 1 format, i will try to get these pages available for you,
the main problem seems to be the VISA read unfunctionality. VISA write commands are sent OK but when it has to read from the buffer it gets a time-out error. what could be the reason for this??
03-08-2011 03:30 PM
Is the interface to the hotplate actually RS-232? I didn't see a VISA Configure Serial Port VI in your hotplate.vi. If you actually are communicating over the serial port then I think you need to configure it first.
You may just need to configure the appropriate termination character.
03-08-2011 03:51 PM
Yes it is using a RS-232 connection via COM1, what would be an appropriate termination character?
03-08-2011 04:16 PM
Hopefully, the appropriate termination character is defined in the commandset manual for the hotplate.
03-08-2011 05:33 PM
Hi jabano,
Clearing buffers can be done by Visa Clear which you have prior to your event structure. Here is also a related Discussion Forum on the timeout topic.
Regards,
Deborah Y.
03-08-2011 06:31 PM
For the termination character it doesn't seem to matter what I put. It resorts back to "A" which is the default case /n . hopefully the delays/waits will help between the write/read? but i've done this earlier so i don't think it seems to help... maybe if i shorten the time?
03-09-2011 08:01 AM
I just noticed that your while loop where you open the VISA resource executes twice. The second time it tries to open the VISA resource, you're probably getting an error which prevents the subsequent read/write operations from occurring.