Sign in to follow this  
Followers 0
mpereira

Versamax Micro HSC problem

3 posts in this topic

Help please, Using a Versamax Micro(23 I/O). Have HSC configured for 1 Type A/1 Type B counters, using counter B. Need to load new value into counter's accumulator. Programmed one-shot logic to load constants using two BLKMOV_INT instructions and a COM_REQ instruction. The following data is loaded; 1st BLKMOV_INT : IN 1=0004, IN 2=0000, IN 3=0000, IN 4=0000, IN 5=0000, IN 6=0000, IN 7=0000, Q=%R02001 2nd BLKMOV_INT : IN 1=0000, IN 2=0008, IN 3=2010, IN 4=0101, IN 5=1000, IN 6=0000, IN 7=0000, Q=%R02008 COM_REQ : IN=%R02001, SYSID=4, TASK=000 When the COM_REQ is called, the value of the accumulator does not change. The counter is otherwise working properly. Using Proficy Machine Edition, V5.50. The only reason I used BLKMOV_INT instructions instead of BLKMOV_WORD is that I could not figure out a way to enter hexadecimal data, without generating errors. Any help would be appreciated. Manuel

Share this post


Link to post
Share on other sites
There is a problem with IN4 of the second BLK_MOV. The command in the manual is in hex. Since you've selected BLK_MOV_INT you have to convert hex 0101 to decimal 257. Also, your decimal 1000 for the value will be interpreted as hex, so with the value given, you're setting the accumulator to 4096. If that exceeeds whatever maximum value you've already estabished, the COMREQ will fail. The enter hex numbers, prefix them with "16#". So, if you use BLK_MOV_WORD, to use the hex value 0101, you would enter 16#0101.

Share this post


Link to post
Share on other sites
Thank you Steve. While looking at the data tables, with the format set to hex, I did notice the number prefixed by 16# but a light didn't go off. Thank you again, my problem should be resolved.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0