[Solved] How to mea...
 
Notifications
Clear all

[Solved] How to measure secondary of CT with Hall effect sensor

0 Posts
1 Users
0 Likes
0 Views
0
Topic starter
mmvgm1 Asks: How to measure secondary of CT with Hall effect sensor
I need to measure the current of a wire using a microcontroller. I was given a 100A/5A CT and now I'm looking into how to measure the secondary. I found an ACS712 module but I'm not sure how to connect it.

Do I need a burden resistor as in the first picture or can I connect it as in the second one?


With burden resistor

Without burden resistor

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

Unreplied Posts

[Solved] Is there a way to change the page number in the TOC when inserting a PDF?

Austin Benny Asks: Is there a way to change the page number in the TOC when inserting a PDF?
At the beginning of my document, i insert a 3 page pdf. In the TOC, i reference the items in the aforementioned 3 page pdf. However, the page number beside the TOC is incorrect. Is there a way to change this page number. Here is a MWE

I import to LaTeX like this:

Code:
includepdf[pages=-]{resources/frontmatter.pdf}

Right now I am putting this after begin{document}

Code:
% add signature block stuff
addcontentsline{toc}{section}{Signature Block}
addcontentsline{toc}{section}{Record of Revision}
setcounter{page}{4}

then this is what my TOC shows:

TOC

I want the page number beside signature block and record of revision to be 2 and 3 respectively. I don’t care about whether the TOC hyperlinks to the Signature block or Record of revisions; just want to change the page numver.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.
 
 
 

[Solved] How to use labels to group blocks in smartdiagram

Gee Asks: How to use labels to group blocks in smartdiagram
I have the below diagram and I want to group the different bars using arrows. My expected output is as shown here! [enter image description here]1. How can I group the different parts using arrow labels e.g. label blocks One, Two, and Three as Early; block Four as Middle, block Five and Six as Late, and block Seven as Very late.

Below is what I have for now.

Code:
documentclass[12pt]{article} 
usepackage{smartdiagram}
usetikzlibrary{shapes.symbols}

definecolor{blue(pigment)}{rgb}{0.2, 0.2, 0.6}
definecolor{yaleblue}{rgb}{0.06, 0.3, 0.57}
definecolor{warmblack}{rgb}{0.0, 0.26, 0.26}
definecolor{airforceblue}{rgb}{0.36, 0.54, 0.66}
definecolor{cerulean}{rgb}{0.0, 0.48, 0.65}
definecolor{charcoal}{rgb}{0.21, 0.27, 0.31}
definecolor{coolblack}{rgb}{0.0, 0.18, 0.39}
definecolor{darkslategray}{rgb}{0.18, 0.31, 0.31}
definecolor{frenchblue}{rgb}{0.0, 0.45, 0.73}
definecolor{indigo(dye)}{rgb}{0.0, 0.25, 0.42}
definecolor{bostonuniversityred}{rgb}{0.8, 0.0, 0.0}
definecolor{burgundy}{rgb}{0.5, 0.0, 0.13}

tikzset{description title/.append style={
    signal, 
    signal to=south, 
    signal from=north,
    yshift=-0.65cm, %0.65
  }
}

begin{document} 

begin{center}
smartdiagramset{description title width=2cm, 
description title text width=1.75cm, %1.75cm
descriptive items y sep=1.7, %2
description text width=8.75cm, %5.75
module minimum height=1.5cm} %1.25
smartdiagram[descriptive diagram]{%
{textbf{One},{Some text here}},          
{textbf{Two},{Some text here}},            
{textbf{Three},{Some text here}},         
{textbf{Four},{Some text here}},
{textbf{Five},{Some text here}},
{textbf{Six},{Some text here}},
{textbf{Seven},{Some text here}}}
end{center}
end{document}

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] How to give tabs or indent to symbol representation

Vedang Asks: How to give tabs or indent to symbol representation
I need to give indent or tab to each symbol I tried quad, tab, indent but doesn’t work.

Code:
begin{equation}
begin{split}
Where,\
&$u_{i}=$ Horizontal displacement
&$v_{mathrm{i}}=$ Vertical displacement\
&$varphi_{i}=$ Rotation Angle\
end{split}
end{equation}


enter image description here

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] Best approach for web app that handles events and is stateful with websockets

diegosasw Asks: Best approach for web app that handles events and is stateful with websockets
I’ve got a web app in AsNetCore (.NET 5)

This app subscribes to a message bus, (with MassTransit over AWS SQS transport layer), so when it receives a new event/message it reacts to it and dequeues from the bus.

At the same time it exposes some functionality over http web API.

Now I have to integrate it with a third party (Zendesk API) which requires opening a websocket with their API and getting data from it or sending graphql requests.

So, as a summary, the flow would go like this

  1. the app receives a user subscribed event (it can persist then data in a DB)
  2. for each user subscribed event it receives it needs to open a websocket to Zendesk AND keep that channel open (here’s the problem) in order to send and receive messages to the third party. A thread per user?
  3. when a message from the bus is received such as user unsubscribed event or when a message is received from websocket indicating that connection has ended, then it releases that websocket

This mix between event driven and stateful websocket is what creates dilemma.

I guess I need a background task. (Hosted service, for example) capable of managing and keeping the different websockets with Zendesk API). Maybe spanning some threads or Tasks for each user subscribed? And then how does this background task knows about the users just subscribed or unsubscribed? How to communicate those events? Do I make some single instance that has the websockets connections and inject it in the message bus event handlers? Do I persist changes in a database and keep reading that database in a loop to know what has happened?

I’d appreciate any guidance on the best approach to tackle this in the most scalable way. I expect to have around 50 websockets opened at all times, it could be many more. I guess the app (and underlying server/OS could easily handle tens of thousands of them?

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] External website in iframe

Nagaraj Asks: External website in iframe
We currently have requirement to show external website in iframe. External website users will have user name and password and salesforce user name and password as well.As part of the authentication i am sending loggedin user salesforce session id in the iframe url parameter. Now the question using this session id can the external system grant access to 3rd party website by doing callback to salesforce and get the user information? Kindly help..

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] Apex: How to generate List of all Friday Dates for given month

Angelo Asks: Apex: How to generate List of all Friday Dates for given month
I am trying to create a List of date type which contains every Friday of the month in it. So for example, for the month of March, the list would contain the dates of March 3rd, 10th, 17th, 24th and 31st. Is there any standard function that would calculate this for me? Or perhaps a standard object that I could query which is simply a calendar so I could use the date query functions? I am not looking for something like

Code:
DAY_IN_WEEK(CreatedDate) = 6

In which it would get every friday from a query, but simply a list of Fridays for that month regardless of querying an object.

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] Can a community user edit their own contact record?

Hasantha Asks: Can a community user edit their own contact record?
Can a community user edit their own contact record?

I’ve seen few question on the stack exchange it self about community user’s editing their own contact record’s details directly.

Somehow could’t find a reference to a salesforce documentation. Could some one help me to confirm whether the community users can or cannot change their own contact record.

I found below idea explaining a workaround: Allowing Customer Portal Users To Edit Their Own Contact Information

and some sfse questions; Community User – Edit Contact Record/Change Account Allow contact to edit own record in customer community

Thanks

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] Duplicate Management in Lightning – Matching Rules vs Duplicate Rules

Todd Sprinkel Asks: Duplicate Management in Lightning – Matching Rules vs Duplicate Rules
In Salesforce Classic experience, we can manually search for duplicate records and pick and choose which ones we want to merge. In Lightning, however, this is not possible, and only records identified in the “Potential Duplicates” page component can be merged manually.

The documentation is unclear in my mind on how the combination of matching rules and duplicate rules drive what records appear as “potential duplicates”. What I’d like to do is create some rules that don’t warn or prevent a user from creating or updating potential duplicates, but cast a wider net in terms of identifying potential duplicates so that a user can review manually. Is this best addressed through matching rules, duplicate rules, or a combination of both?

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] Webservice or 3rd Party Integration Credentials in Production/Sandbox environment

BodegaBlanco Asks: Webservice or 3rd Party Integration Credentials in Production/Sandbox environment
Was wondering if there was a way to either use the UI or SOQL query to find the credentials being used by Webservices to access the Production/Sandbox environment. I’m not sure if there is a straight forward way to acquire this or a way to search within Apex classes potentially for Named Credentials for this information.

Any ideas?

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

[Solved] Conditional rendering for dual listbox depending on selection ” if:true={show…}”

jbuch Asks: Conditional rendering for dual listbox depending on selection ” if:true={show…}”
I have a search bar that returns: Users, Queues and Pub Groups. When I click on a user I want to show a UserDual-Listbox I’d like to show, and when clicking on the queues or pub groups I want to show in the UI a GroupsDual-Listbox. For the moment I have all the dual listboxes being displayed in the UI.

I tried creating a method in the code, when depending on the selection the right dual listbox will appear and then I call this method into each dual list, however it is not working. I hides everything and when I click an object from the search bar nothing appears either.

Code:
showResults(){
        if ( JSON.stringify( this.selectedQueues ) != JSON.stringify( this.updatedQueues ) ) {
            showDualSelectedUser = true;
        }
        if ( JSON.stringify( this.selectedPubGrps ) != JSON.stringify( this.updatedPubGrps ) ) {
            showDualSelectedUser = true;
        }
        if ( JSON.stringify( this.selectedUsers ) != JSON.stringify( this.updatedUsers ) ) {
            showDualSelectedGroup = true;
        }

I also tried declaring properties to false:

  • showDualSelectedUser= false;
  • showDualSelectedGroup= false;

and call them in each list on the HTML however it’s not working. I have different functions on JS, so I’m confused where should I call this properties. Does anyone have an idea where should I call this properties in the JS ?

JS

Code:
@track objName = '';
    @track usersList = []; 
    @track queuesList=[];
    @track pgList=[];
    @track usersGroupList=[];
    @track groupList=[];    
    @track objectApiName = 'User'
    @track objectApi= ''
    @track userFound = false;
    @track messageResult=false; //not found message
    @track isShowResult = true;   
    @track showSearchedValues = false;  
    @track selectedObj;
    @track showName;
    showDualSelectedUser= false;
    showDualSelectedGroup= false;
    //retrieveSelectedGroupsResult;
    //retrieveSelectedUsersResult;
    
    //declare properties dual listbox when selecting an USER
    availableQueues;
    selectedQueues;
    updatedQueues;
    availablePubGrps;
    selectedPubGrps;
    updatedPubGrps;
    
    //declare properties when selecting a Group
    availableUsers;
    selectedUsers;
    updatedUsers;
    showBoolGroup = false;
    buttonBoolGroup = false;

    //declare properties for Save method
    showBool = false;
    buttonBool = false;
    disableBool = false;  
   
    //calling data for SearchBar 
    @wire(getAllUsersGroups, {objName:'$objName'})
    retrieveUsers ({error, data}) {
       this.messageResult=false;
       if (data) {
           console.log('dataForSearch::'+ JSON.stringify (data));
           if(data.length>0 && this.isShowResult){
               this.usersGroupList = data;                
               this.showSearchedValues = true; 
               this.messageResult=false;

           }else if(data.length==0){

               this.usersGroupList = [];                
               this.showSearchedValues = false;
               if(this.objName!='')
                   this.messageResult=true;  

           }
       } else if (error) {
           this.selectedObj =  '';
           this.objName =  '';
           this.usersList=[];           
           this.showSearchedValues = false;
           this.messageResult=true;   
       }
   }
   
   handleClick(event){
       this.isShowResult = true;
       this.messageResult=false;
       this.userFound=false;
    }

    handleKeyChange(event){
        this.messageResult=false;
        this.objName = event.target.value;
        this.userFound=false;
    }
    
    handleDataSelection(event){
        console.log('parentEventID '+ (event.target.dataset.value));
        console.log('parentEvent'+ JSON.stringify(event.target.dataset));
        this.showSearchedValues = false;
        this.isShowResult = false; 
        this.messageResult=false;
        this.objName =  event.target.dataset.label;      
        console.log('objName::'+this.objName); 
        this.selectedObj = event.target.dataset.value; 
        this.showName= event.target.dataset.label; 
        console.log('selectedObj:'+this.selectedObj);
    }

    //call data for dual listbox when selecting an User
    @wire(fetchQueuesPubGrps, { userId:'$selectedObj'})
    retrieveSelectedUsers ({error, data,results}) {
        //this.retrieveSelectedUsers= results;
        //this.messageResult=false;
        console.log('This is the selectedUser' + JSON.stringify(this.selectedObj));
        if (data) {
            console.log( 'Data ===> ' + (data) );
            console.log( 'Records are ' + JSON.stringify( data ) );
            this.availableQueues = data.availableQueues;
             console.log('availableQueues:', data.availableQueues);
            this.selectedQueues = data.selectedQueues;
            console.log('selectedQueues:', data.selectedQueues);
            this.updatedQueues = data.selectedQueues;
            console.log('updatedQueues:', data.selectedQueues);
            this.availablePubGrps = data.availablePubGrps;
            this.selectedPubGrps = data.selectedPubGrps;
            this.updatedPubGrps = data.selectedPubGrps;
           

        } else if (error)  {
            this.dispatchEvent(
                new ShowToastEvent({
                    title: 'Error!!',
                    message: 'Some error occured. Please reach out to your Salesforce Admin for help!',
                    variant: 'error',
                    mode: 'sticky'
                }),
            );   
            //return refreshApex(this.retrieveSelectedUsersResult);  
        } 
    }

       //call data for dual listbox when selecting a Group
       @wire(fetchUsers, { groupId:'$selectedObj'})
       retrieveSelectedGroups ({error, data, results}) {
           //this.retrieveSelectedGroups= results;
           //this.messageResult=false;
           console.log('This is the selectedGroup' + JSON.stringify(this.selectedObj));
           if (data) {
               console.log( 'Data ===> ' + (data) );
               console.log( 'Records are ' + JSON.stringify( data ) );
               this.availableUsers = data.availableUsers;
                console.log('availableUsers:', data.availableUsers);
               this.selectedUsers = data.selectedUsers;
               console.log('selectedUsers:', data.selectedUsers);
               this.updatedQueues = data.selectedUsers;
               console.log('updatedQueues:', data.selectedUsers);
   
           } else if (error)  {
               this.dispatchEvent(
                   new ShowToastEvent({
                       title: 'Error!!',
                       message: 'Some error occured. Please reach out to your Salesforce Admin for help!',
                       variant: 'error',
                       mode: 'sticky'
                   }),
               );
               //return refreshApex(this.retrieveSelectedGroupsResult);
           } 
       }
    
    handleQueuesChange(event) {
        const selectedOptionsList = event.detail.value;
        console.log( 'Selected Queues to move to the right before saving  ' + JSON.stringify( selectedOptionsList ) );
        this.updatedQueues = selectedOptionsList;
        console.log( 'Queues that are already in the selected user ' + JSON.stringify( this.selectedQueues ) );
        //this.showUsersDual=false;
    }

    handlePubGrpsChange(event) {
        const selectedOptionsList = event.detail.value;
        console.log( 'Selected PubGrp opt are ' + JSON.stringify( selectedOptionsList ) );
        this.updatedPubGrps = selectedOptionsList;
        console.log( 'Updated Selected Public Groups are ' + JSON.stringify( this.selectedPubGrps ) );
       // this.showUsersDual=false;
    }

    handleUsersChange(event) {
        const selectedUsersList = event.detail.value;
        console.log( 'Selected Users are ' + JSON.stringify( selectedUsersList ) );
        this.updatedUsers = selectedUsersList;
        console.log( 'Updated Users are ' + JSON.stringify( this.selectedUsers ) );
        //this.showUsersDual=true;
    }

    /*showResults(){
        if ( JSON.stringify( this.selectedQueues ) != JSON.stringify( this.updatedQueues ) ) {
            showDualSelectedUser = true;
        }
        if ( JSON.stringify( this.selectedPubGrps ) != JSON.stringify( this.updatedPubGrps ) ) {
            showDualSelectedUser = true;
        }
        if ( JSON.stringify( this.selectedUsers ) != JSON.stringify( this.updatedUsers ) ) {
            showDualSelectedGroup = true;
        }
    }*/

    saveChanges() {
        let queuesUpdatedBool = false;
        let pubGrpsUpdatedBool = false;
        console.log( 'list of queues that the user already had ' + JSON.stringify( this.selectedQueues ) );
        console.log( 'list of previous queues plus the new one added ' + JSON.stringify( this.updatedQueues ) );
        console.log( 'selectedPubGrps is ' + JSON.stringify( this.selectedPubGrps ) );
        console.log( 'updatedPubGrps is ' + JSON.stringify( this.updatedPubGrps ) );
       
        if ( JSON.stringify( this.selectedQueues ) != JSON.stringify( this.updatedQueues ) ) {
            queuesUpdatedBool = true;
        }
        if ( JSON.stringify( this.selectedPubGrps ) != JSON.stringify( this.updatedPubGrps ) ) {
            pubGrpsUpdatedBool = true;
        }
        console.log( 'queuesUpdatedBool is ' + queuesUpdatedBool );
        console.log( 'pubGrpsUpdatedBool is ' + pubGrpsUpdatedBool );
     

        if ( queuesUpdatedBool || pubGrpsUpdatedBool ) {

            addRemove( {userId:this.selectedObj,
                selectedQueues : this.selectedQueues, updatedQueues : this.updatedQueues,
                selectedPubGrps : this.selectedPubGrps, updatedPubGrps : this.updatedPubGrps,
                queuesUpdatedBool : queuesUpdatedBool, pubGrpsUpdatedBool : pubGrpsUpdatedBool } )
            .then( result => {
                console.log( 'Result ' + JSON.stringify( result ) );
                let message;
                let variant;
                if ( result === 'Successful' ) {
                    message = 'Successfully Processed!';
                    variant = 'success';
                } else {
                    message = 'Some error occured. Please reach out to your Salesforce Admin for help!';
                    variant = 'error';
                }

                const toastEvent = new ShowToastEvent( {
                    title: 'Your changes have being saved',
                    message: message,
                    variant: variant
                } );
                this.dispatchEvent( toastEvent );
                return refreshApex(this.result);
            } )
            .catch( error => {
                console.log( 'Error' + JSON.stringify( error ) );
            } );
            this.buttonBool = true;
        } else {
            alert( "No changes made!!!" );
        }
    }

    saveChangesUser(){
            
        let updatedBool = false;
        this.disableBool = true;

        if ( JSON.stringify( this.selectedUsers ) != JSON.stringify( this.updatedUsers ) ) {
            updatedBool = true;
        }

        if ( updatedBool == true ) {
        addRemoveUsers( {groupId:this.selectedObj,
            selectedUsers : this.selectedUsers, updatedUsers : this.updatedUsers } )
        .then( result => {
            console.log( 'Result ' + JSON.stringify( result ) );
            let message;
            let variant;
            if ( result === 'Successful' ) {
                message = 'Successfully Processed!';
                variant = 'success';
            } else {
                message = 'Some error occured. Please reach out to your Salesforce Admin for help!';
                variant = 'error';
            }

            const toastEvent = new ShowToastEvent( {
                title: 'Your changes have being saved',
                message: message,
                variant: variant
            } );
            this.dispatchEvent( toastEvent );
            return refreshApex(this.result);
         
        } )
        .catch( error => {
            console.log( 'Error' + JSON.stringify( error ) );
        } );
        
    } else {
        alert( "No changes made!!!" );
    }
}
}

Ten-tools.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, Ten-tools.

 

 


 

Share: