LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

buffer problem?

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.

0 Kudos
Message 21 of 48
(1,126 Views)

the hotplate is made by SCILOGEX and is model MS-H-PRO

0 Kudos
Message 22 of 48
(1,120 Views)

Do you have a commandset manual for the MS-H-PRO?

 

All I could find on the internet is a proprietary RS-232 interface.

0 Kudos
Message 23 of 48
(1,104 Views)

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??

0 Kudos
Message 24 of 48
(1,087 Views)

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.

0 Kudos
Message 25 of 48
(1,073 Views)

Yes it is using a RS-232 connection via COM1, what would be an appropriate termination character?

0 Kudos
Message 26 of 48
(1,065 Views)

Hopefully, the appropriate termination character is defined in the commandset manual for the hotplate.

0 Kudos
Message 27 of 48
(1,060 Views)

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.

Deborah Burke
NI Hardware and Drivers Product Manager
Certified LabVIEW Architect
0 Kudos
Message 28 of 48
(1,041 Views)

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?    

0 Kudos
Message 29 of 48
(1,035 Views)

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.

0 Kudos
Message 30 of 48
(1,023 Views)